OFFSET
0,1
COMMENTS
Also continued fraction expansion of (3+sqrt(15))/2.
Also decimal expansion of 32/99.
a(n) = A010693(n+1).
Essentially first differences of A047218.
Binomial transform of 3 followed by -A122803.
Inverse binomial transform of 3 followed by A020714.
Second inverse binomial transform of A057198 without initial term 1.
LINKS
FORMULA
a(n) = (5+(-1)^n)/2.
a(n) = a(n-2) for n > 1; a(0) = 3, a(1) = 2.
a(n) = -a(n-1)+5 for n > 0; a(0) = 3.
a(n) = 3*((n+1) mod 2)+2*(n mod 2).
G.f.: (3+2*x)/((1-x)*(1+x)).
MAPLE
MATHEMATICA
a[n_] := {3, 2}[[Mod[n, 2] + 1]]; Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Jul 19 2013 *)
PadRight[{}, 120, {3, 2}] (* Harvey P. Dale, Oct 06 2019 *)
PROG
(Magma) &cat[ [3, 2]: n in [0..52] ];
[ (5+(-1)^n)/2: n in [0..104] ];
(Haskell)
a176059 = (3 -) . (`mod` 2) -- Reinhard Zumkeller, Nov 27 2012
(Haskell)
a176059_list = cycle [3, 2] -- Reinhard Zumkeller, Apr 04 2012
(PARI) a(n)=3-n%2 \\ Charles R Greathouse IV, Jul 13 2016
CROSSREFS
KEYWORD
AUTHOR
Klaus Brockhaus, Apr 07 2010
STATUS
approved