[go: up one dir, main page]

login
A176059
Periodic sequence: Repeat 3, 2.
22
3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3
OFFSET
0,1
COMMENTS
Interleaving of A010701 and A007395.
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.
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
A176059:=n->(5+(-1)^n)/2; seq(A176059(n), n=0..100); # Wesley Ivan Hurt, Feb 26 2014
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
Cf. A010701 (all 3's sequence), A007395 (all 2's sequence), A176058 (decimal expansion of (3+sqrt(15))/2), A010693 (repeat 2, 3), A047218 (congruent to {0, 3} mod 5), A122803 (powers of -2), A020714 (5*2^n), A057198 ((5*3^(n-1)+1)/2, n > 0).
Cf. A026532 (partial products).
Sequence in context: A308006 A049071 A168330 * A262785 A264843 A316290
KEYWORD
cofr,cons,nonn,easy
AUTHOR
Klaus Brockhaus, Apr 07 2010
STATUS
approved