OFFSET
0,3
COMMENTS
Continued fraction expansion of (9+sqrt(221))/14. - Klaus Brockhaus, May 03 2010
From Klaus Brockhaus, May 14 2010: (Start)
Decimal expansion of 34/303.
a(n) = A014695(n+3). (End)
Lengths of runs in A214090. - Reinhard Zumkeller, Jul 06 2012
LINKS
FORMULA
G.f.: ( 1+2*x^2 ) / ( (1-x)*(1+x^2) ). - R. J. Mathar, Jan 18 2011
a(n) = (n^3 mod 4 + (n+1)^3 mod 4 + 1)/2. - Gary Detlefs, Apr 15 2011
a(n) = -1/2*cos(1/2*Pi*n)-1/2*sin(1/2*Pi*n)+3/2. - Leonid Bedratyuk, May 13 2012
From Wesley Ivan Hurt, May 30 2015: (Start)
a(n) = a(n-1) - a(n-2) + a(n-3), n>3.
a(n) = (3+(-1)^((2*n+3+(-1)^n)/4))/2. (End)
From Wesley Ivan Hurt, Jul 11 2016: (Start)
a(n) = a(n-4) for n>3.
a(n) = A021913(n) + 1. (End)
MAPLE
seq(op([1, 1, 2, 2]), n=0..50); # Wesley Ivan Hurt, Jul 11 2016
MATHEMATICA
PadRight[{}, 100, {1, 1, 2, 2}] (* Wesley Ivan Hurt, Jul 11 2016 *)
PROG
(Haskell)
a130658 = (+ 1) . (`div` 2) . (`mod` 4)
a130658_list = cycle [1, 1, 2, 2] -- Reinhard Zumkeller, Jul 06 2012
(Magma) &cat [[1, 1, 2, 2]^^30]; // Wesley Ivan Hurt, Jul 11 2016
(PARI) a(n)=(n%4>1)+1 \\ Charles R Greathouse IV, Jul 11 2016
CROSSREFS
KEYWORD
nonn,easy,less
AUTHOR
Paul Curtz, Jun 21 2007
EXTENSIONS
More terms from Klaus Brockhaus, May 14 2010
STATUS
approved