[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A205651
Period 6: repeat [1, 6, 5, 4, 9, 0].
1
1, 6, 5, 4, 9, 0, 1, 6, 5, 4, 9, 0, 1, 6, 5, 4, 9, 0, 1, 6, 5, 4, 9, 0, 1, 6, 5, 4, 9, 0, 1, 6, 5, 4, 9, 0, 1, 6, 5, 4, 9, 0, 1, 6, 5, 4, 9, 0, 1, 6, 5, 4, 9, 0, 1, 6, 5, 4, 9, 0, 1, 6, 5, 4, 9, 0, 1, 6, 5, 4, 9, 0, 1, 6, 5, 4, 9, 0, 1, 6, 5, 4, 9, 0, 1, 6
OFFSET
1,2
COMMENTS
The members of this sequence are also the units' digits of the indices of those nonzero square numbers that are also triangular.
The coefficients of x^n in the numerator of the generating function form the periodic cycle of the sequence.
FORMULA
G.f.: x*(1+6*x+5*x^2+4*x^3+9*x^4) / ((1-x)*(1+x)*(1-x+x^2)*(1+x+x^2)).
a(n) = a(n-6) for n>6.
a(n) = 25 - a(n-1) - a(n-2) - a(n-3) - a(n-4) - a(n-5) for n>5.
For n>0, a(n) = A010879(A001109(n)) = A010879(sqrt(A001110(n))) = mod(A001109(n),10).
a(n) = (25-5*cos(n*Pi)-10*cos(n*Pi/3)-10*cos(2*n*Pi/3)-2*sqrt(3)*(3*sin(n*Pi/3)+5*sin(2*n*Pi/3)))/6. - Wesley Ivan Hurt, Jun 18 2016
EXAMPLE
The fourth nonzero square number that is also a triangular number is 204^2. As 204 has units' digit 4, then a(4)=4.
MAPLE
A205651:=n->(25-5*cos(n*Pi)-10*cos(n*Pi/3)-10*cos(2*n*Pi/3)-2*sqrt(3)*(3*sin(n*Pi/3)+5*sin(2*n*Pi/3)))/6: seq(A205651(n), n=1..100); # Wesley Ivan Hurt, Jun 18 2016
MATHEMATICA
LinearRecurrence[{0, 0, 0, 0, 0, 1}, {1, 6, 5, 4, 9, 0}, 86]
PadRight[{}, 120, {1, 6, 5, 4, 9, 0}] (* Vincenzo Librandi, Jun 19 2016 *)
PROG
(PARI) a(n)=[0, 1, 6, 5, 4, 9][n%6+1] \\ Charles R Greathouse IV, Jan 31 2012
(Magma) &cat[[1, 6, 5, 4, 9, 0]: n in [0..20]]; // Wesley Ivan Hurt, Jun 18 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ant King, Jan 31 2012
STATUS
approved