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”).

A205184
Period 12: repeat (1, 8, 4, 9, 7, 8, 7, 9, 4, 8, 1, 9).
0
1, 8, 4, 9, 7, 8, 7, 9, 4, 8, 1, 9, 1, 8, 4, 9, 7, 8, 7, 9, 4, 8, 1, 9, 1, 8, 4, 9, 7, 8, 7, 9, 4, 8, 1, 9, 1, 8, 4, 9, 7, 8, 7, 9, 4, 8, 1, 9, 1, 8, 4, 9, 7, 8, 7, 9, 4, 8, 1, 9, 1, 8, 4, 9, 7, 8, 7, 9, 4, 8, 1, 9, 1, 8, 4, 9, 7, 8, 7, 9, 4, 8, 1, 9, 1, 8
OFFSET
1,2
COMMENTS
The terms of this sequence are the digital roots of the indices of those nonzero triangular numbers that are also perfect squares (A001108).
FORMULA
G.f.: x*(1+8*x+3*x^2+x^3+3*x^4-x^5+x^6+9*x^7) / ((1-x)*(1+x)*(1+x^2)*(1-sqrt(3)*x+x^2)*(1+sqrt(3)*x+x^2)).
a(n) = a(n-12).
a(n) = 25-a(n-1)-a(n-6)-a(n-7).
a(n) = a(n-2)-a(n-6)+a(n-8).
a(n) = 1/4*(25+(-1)^n*(9+4*sqrt(3)*(cos(n*Pi/6)-cos(5*n*Pi/6))+2*cos(n*Pi/2))).
EXAMPLE
As the fourth nonzero triangular number that is also a perfect square is A000217(288), and 288 has digital root A010888(288)=9, then a(4)=9.
MATHEMATICA
LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, {1, 8, 4, 9, 7, 8, 7, 9, 4, 8, 1, 9}, 86]
LinearRecurrence[{0, 1, 0, 0, 0, -1, 0, 1}, {1, 8, 4, 9, 7, 8, 7, 9}, 86] (* Ray Chandler, Aug 03 2015 *)
PROG
(PARI) a(n)=[9, 1, 8, 4, 9, 7, 8, 7, 9, 4, 8, 1][n%12+1] \\ Charles R Greathouse IV, Jul 17 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ant King, Jan 23 2012
STATUS
approved