A152855 Period 5: Repeat [1, 2, 0, 2, 0].
1, 2, 0, 2, 0, 1, 2, 0, 2, 0, 1, 2, 0, 2, 0, 1, 2, 0, 2, 0, 1, 2, 0, 2, 0, 1, 2, 0, 2, 0, 1, 2, 0, 2, 0, 1, 2, 0, 2, 0, 1, 2, 0, 2, 0, 1, 2, 0, 2, 0, 1, 2, 0, 2, 0, 1, 2, 0, 2, 0, 1, 2, 0, 2, 0, 1, 2, 0, 2, 0, 1, 2, 0, 2, 0, 1, 2, 0, 2, 0, 1, 2, 0, 2, 0, 1, 2, 0, 2, 0, 1, 2, 0, 2, 0, 1, 2, 0, 2, 0, 1, 2, 0, 2, 0
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,1)
Crossrefs
Cf. A026039.
Programs
-
Mathematica
PadRight[{},120,{1,2,0,2,0}] (* Harvey P. Dale, Dec 17 2022 *)
Formula
a(n+5) = a(n) with a(0) = 1, a(1) = a(3) = 2 and a(2) = a(4) = 0.
O.g.f.: f(z) = (1+2*z+2*z^3)/(1-z^5).
a(n) = 1+(-1/5*((5-5^(1/2))^(1/2)-(5+5^(1/2))^(1/2))*2^(1/2))*sin(2*n*Pi/5)+(1/5*((5-5^(1/2))^(1/2)+(5+5^(1/2))^(1/2))*2^(1/2))*sin(4*n*Pi/5).