A177002 Period 4: repeat [1, 2, 4, 2].
1, 2, 4, 2, 1, 2, 4, 2, 1, 2, 4, 2, 1, 2, 4, 2, 1, 2, 4, 2, 1, 2, 4, 2, 1, 2, 4, 2, 1, 2, 4, 2, 1, 2, 4, 2, 1, 2, 4, 2, 1, 2, 4, 2, 1, 2, 4, 2, 1, 2, 4, 2, 1, 2, 4, 2, 1, 2, 4, 2, 1, 2, 4, 2, 1, 2, 4, 2, 1, 2, 4, 2, 1, 2, 4, 2, 1, 2, 4, 2, 1, 2, 4, 2, 1, 2
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,1).
Crossrefs
Cf. A174882.
Programs
-
Magma
&cat [[1, 2, 4, 2]^^30]; // Wesley Ivan Hurt, Jul 09 2016
-
Maple
seq(op([1, 2, 4, 2]), n=0..50); # Wesley Ivan Hurt, Jul 09 2016
-
Mathematica
PadRight[{}, 100, {1, 2, 4, 2}] (* Wesley Ivan Hurt, Jul 09 2016 *)
Formula
G.f.: (1+2*x+4*x^2+2*x^3)/((1-x)*(1+x)*(x^2+1)). - R. J. Mathar, Dec 13 2010
a(n) = 2+(1+(-1)^n)*(1-3*I^n)/4. - Bruno Berselli, Mar 15 2011
a(n) = a(n-1) * a(n-3) / a(n-2) for n>2. - Bruno Berselli, Feb 04 2013
From Wesley Ivan Hurt, Jul 09 2016: (Start)
a(n) = a(n-4) for n>3.
a(n) = (9 + cos(n*Pi) - 6*cos(n*Pi/2))/4. (End)
Comments