OFFSET
0,1
COMMENTS
Continued fraction expansion of (21+5*sqrt(26))/19 = A177153. - Klaus Brockhaus, May 03 2010
A045572(n)^a(n) == 1 (mod 10). For n>1, a(n) is the smallest positive exponent with this property. - Christina Steffan, Sep 08 2015
LINKS
FORMULA
a(n) = 2*A130658(n).
From R. J. Mathar, Sep 11 2009: (Start)
a(n) = a(n-1) - a(n-2) + a(n-3) for n>2.
G.f.: 2*(1+2*x^2)/((1-x)*(1+x^2)). (End)
a(n) = 3-cos(Pi*n/2)-sin(Pi*n/2). - R. J. Mathar, Oct 08 2011
a(n) = 2 + (2*floor(n/2) mod 4). - Wesley Ivan Hurt, Apr 20 2015
a(n) = a(n-4) for n>3. - Wesley Ivan Hurt, Jul 09 2016
MAPLE
seq(op([2, 2, 4, 4]), n=0..50); # Wesley Ivan Hurt, Jul 09 2016
MATHEMATICA
PadRight[{}, 120, {2, 2, 4, 4}] (* Harvey P. Dale, Oct 08 2014 *)
PROG
(Magma) &cat[[2, 2, 4, 4]^^30]; // Vincenzo Librandi, Feb 08 2016
(PARI) a(n)=n\2*2%4 + 2 \\ Charles R Greathouse IV, Jul 17 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Sep 07 2009
EXTENSIONS
Edited, offset set to 0, by R. J. Mathar, Sep 11 2009
STATUS
approved