Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A205185
Period 6: repeat [1, 8, 9, 8, 1, 0].
1
1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8, 9, 8, 1, 0, 1, 8
OFFSET
1,2
COMMENTS
The terms of this sequence are the units' digits of the indices of those nonzero triangular numbers that are also perfect squares (A001108).
FORMULA
G.f.: x*(1+7x+x^2) / ((1-x)*(1+x)*(1-x+x^2)).
a(n) = a(n-6) for n>6.
a(n) = 9-a(n-3) for n>3.
a(n) = a(n-1) - a(n-3) + a(n-4) for n>4.
a(n) = 1/6*(27+(-1)^n*(5-32*cos(2*n*Pi/3))).
EXAMPLE
As the fourth nonzero triangular number that is also a perfect square is A000217(288), and 288 has units' digit A010879(288)=8, then a(4)=8.
MAPLE
A205185:=n->[1, 8, 9, 8, 1, 0][(n mod 6)+1]: seq(A205185(n), n=0..100); # Wesley Ivan Hurt, Jun 18 2016
MATHEMATICA
LinearRecurrence[{0, 0, 0, 0, 0, 1}, {1, 8, 9, 8, 1, 0}, 86]
PadRight[{}, 100, {1, 8, 9, 8, 1, 0}] (* Vincenzo Librandi, Jun 19 2016 *)
PROG
(Magma) &cat[[1, 8, 9, 8, 1, 0]: n in [0..20]]; // Wesley Ivan Hurt, Jun 18 2016
(PARI) a(n)=[0, 1, 8, 9, 8, 1][n%6+1] \\ Charles R Greathouse IV, Jul 17 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ant King, Jan 24 2012
STATUS
approved