OFFSET
0,2
COMMENTS
Also the decimal expansion of 138/1111 and the continued fractions of (5+3*sqrt(10))/10 or (6*sqrt(10)-10)/13. - R. J. Mathar, Dec 13 2010
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,1).
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)
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 *)
PROG
(Magma) &cat [[1, 2, 4, 2]^^30]; // Wesley Ivan Hurt, Jul 09 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Dec 08 2010
STATUS
approved