login
A186181
Period 4 sequence [ 2, 2, 3, 2, ...] except a(0) = 1.
0
1, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2
OFFSET
0,2
COMMENTS
Continued fraction expansion of sqrt(33)/4. - Bruno Berselli, Feb 14 2011
FORMULA
Euler transform of length 4 sequence [ 2, 0, -2, 1].
Moebius transform is length 4 sequence [ 2, 1, 0, -1].
a(n) = 2 * b(n) where b() is multiplicative with b(2) = 3/2, b(2^e) = 1 if e>1, b(p^e) = 1 if p>2.
G.f.: (1 + x + x^2)^2 / (1 - x^4). a(-n) = a(n). a(4*n + 2) = 3, a(2*n + 1) = 2, a(4*n) = 2 except a(0) = 1.
a(n) = 2+(1+(-1)^n)*(1-i^n)/4 - A000007(n), with i=sqrt(-1). - Bruno Berselli, Mar 16 2011
EXAMPLE
1 + 2*x + 3*x^2 + 2*x^3 + 2*x^4 + 2*x^5 + 3*x^6 + 2*x^7 + 2*x^8 + 2*x^9 + ...
MATHEMATICA
PadRight[{1}, 108, {2, 2, 3, 2}] (* Harvey P. Dale, Oct 01 2011 *)
PROG
(PARI) {a(n) = 2 - (n==0) + (n%4 == 2)}
(PARI) {a(n) = polcoeff( (1 + x + x^2)^2 / (1 - x^4) + x * O(x^abs(n)), abs(n))}
CROSSREFS
Sequence in context: A078832 A086410 A185049 * A324983 A147561 A210659
KEYWORD
nonn,easy
AUTHOR
Michael Somos, Feb 14 2011
STATUS
approved