login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A164356
Expansion of (1 - x^2)^4 / ((1 - x)^4 * (1 - x^4)) in powers of x.
2
1, 4, 6, 4, 2, 4, 6, 4, 2, 4, 6, 4, 2, 4, 6, 4, 2, 4, 6, 4, 2, 4, 6, 4, 2, 4, 6, 4, 2, 4, 6, 4, 2, 4, 6, 4, 2, 4, 6, 4, 2, 4, 6, 4, 2, 4, 6, 4, 2, 4, 6, 4, 2, 4, 6, 4, 2, 4, 6, 4, 2, 4, 6, 4, 2, 4, 6, 4, 2, 4, 6, 4, 2, 4, 6, 4, 2, 4, 6, 4, 2, 4, 6, 4, 2, 4, 6, 4, 2, 4, 6, 4, 2, 4, 6, 4, 2, 4, 6, 4, 2, 4, 6, 4, 2
OFFSET
0,2
FORMULA
Euler transform of length 4 sequence [4, -4, 0, 1].
Moebius transform is length 4 sequence [4, 2, 0, -4].
a(n) = 4 * b(n) unless n=0 and b(n) is multiplicative with b(2) = 3/2, b(2^e) = 1/2 if e>1, b(p^e) = 1 if p>2.
a(n) = a(-n) for all n in Z. a(n+4) = a(n) unless n=0 or n=-4. a(2*n + 1) = 4. a(4*n) = 2 unless n=0. a(4*n + 2) = 6.
G.f.: -1 + 4 / (1 - x) - 2 / (1 + x^2).
a(n) = 2 * A068073(n) unless n=0. - Michael Somos, Apr 17 2015
EXAMPLE
G.f. = 1 + 4*x + 6*x^2 + 4*x^3 + 2*x^4 + 4*x^5 + 6*x^6 + 4*x^7 + 2*x^8 + ...
MATHEMATICA
a[ n_] := -Boole[n == 0] + 4 - If[ EvenQ[n], (-1)^(n/2) 2, 0]; (* Michael Somos, Apr 17 2015 *)
a[ n_] := SeriesCoefficient[ -1 + 4/(1 - x) - 2/(1 + x^2), {x, 0, Abs@n}]; (* Michael Somos, Jan 07 2019 *)
LinearRecurrence[{1, -1, 1}, {1, 4, 6, 4}, 120] (* or *) PadRight[{1}, 120, {2, 4, 6, 4}] (* Harvey P. Dale, Aug 30 2024 *)
PROG
(PARI) {a(n) = -(n==0) + 4 - if( n%2 == 0, (-1)^(n/2) * 2, 0)};
CROSSREFS
Cf. A068073.
Sequence in context: A131890 A062751 A135911 * A181774 A291379 A001138
KEYWORD
nonn,easy
AUTHOR
Michael Somos, Aug 13 2009
STATUS
approved