OFFSET
0,3
COMMENTS
LINKS
FORMULA
a(n) = a(n-3) for n > 2, with a(0) = 1, a(1) = 1, a(2) = 2.
G.f.: (1+x+2*x^2)/(1-x^3).
a(n) = 4/3 - cos(2*Pi*n/3)/3 - sin(2*Pi*n/3)/sqrt(3). - R. J. Mathar, Oct 08 2011
a(n) = 1 + A022003(n). - Wesley Ivan Hurt, Jul 01 2016
MAPLE
seq(op([1, 1, 2]), n=1..50); # Wesley Ivan Hurt, Jul 01 2016
MATHEMATICA
PadRight[{}, 120, {1, 1, 2}] (* or *) LinearRecurrence[{0, 0, 1}, {1, 1, 2}, 120] (* Harvey P. Dale, Dec 19 2014 *)
PROG
(Magma) &cat[ [1, 1, 2]: k in [1..35] ];
(PARI) a(n)=max(n%3, 1) \\ Charles R Greathouse IV, Jul 17 2016
CROSSREFS
KEYWORD
cofr,nonn,easy
AUTHOR
Klaus Brockhaus, May 11 2010
STATUS
approved