A115357 Period 6: repeat [1,1,1,0,2,0].
1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (-1,0,1,1).
Crossrefs
Cf. A171182. [From Juri-Stepan Gerasimov, Dec 04 2009]
Cf. A115356.
Programs
-
Mathematica
PadRight[{},120,{1,1,1,0,2,0}] (* or *) LinearRecurrence[{-1,0,1,1},{1,1,1,0},120] (* Harvey P. Dale, Jan 28 2015 *)
Formula
G.f.: (1+2*x+2*x^2)/(1+x-x^3-x^4).
a(n) = -a(n-1)+a(n-3)+a(n-4).
a(n) = -cos(2*Pi*n/3+Pi/6)/sqrt(3)+sin(2*Pi*n/3+Pi/6)/3+(-1)^n/2+5/6.
Sequence shifted right by 2 is additive with a(p^e) = 1 if p = 2 or 3, 0 otherwise.
Comments