OFFSET
0,2
LINKS
FORMULA
a(n) = (n mod 4) mod 3, with offset 1..a(1)=1. - Gary Detlefs, Mar 28 2010
a(n) = floor(((2*n+4) mod 8)/3). - Gary Detlefs, Jul 02 2011
a(n) = (3-(-1)^n)*(1+I^((n-1)*n))/4. - Bruno Berselli, Sep 28 2011
G.f.: (1+2*x)/(1-x^4). - Bruno Berselli, Sep 28 2011
From Wesley Ivan Hurt, Jul 09 2016: (Start)
a(n) = (3 + 2*cos(n*Pi/2) - cos(n*Pi) + 4*sin(n*Pi/2) - I*sin(n*Pi))/4.
a(n) = a(n-4) for n>3. (End)
a(n) = n + 1 - floor((n+1)/4) - 3*floor((n+2)/4). - Ridouane Oudra, Apr 15 2021
MAPLE
seq(op([1, 2, 0, 0]), n=0..40); # Wesley Ivan Hurt, Jul 09 2016
MATHEMATICA
PadRight[{}, 100, {1, 2, 0, 0}] (* Wesley Ivan Hurt, Jul 09 2016 *)
CoefficientList[Series[(1 + 2 x)/(1 - x^4), {x, 0, 80}], x] (* Michael De Vlieger, Dec 23 2016 *)
PROG
(Magma) &cat [[1, 2, 0, 0]^^30]; // Wesley Ivan Hurt, Jul 09 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Aug 17 2007
EXTENSIONS
Edited by N. J. A. Sloane, Sep 15 2007
STATUS
approved