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”).

A181982
Expansion of (1 - x^2)^2 * (1 + x)^2 / (1 - x^6) in powers of x.
2
1, 2, -1, -4, -1, 2, 2, 2, -1, -4, -1, 2, 2, 2, -1, -4, -1, 2, 2, 2, -1, -4, -1, 2, 2, 2, -1, -4, -1, 2, 2, 2, -1, -4, -1, 2, 2, 2, -1, -4, -1, 2, 2, 2, -1, -4, -1, 2, 2, 2, -1, -4, -1, 2, 2, 2, -1, -4, -1, 2, 2, 2, -1, -4, -1, 2, 2, 2, -1, -4, -1, 2, 2, 2
OFFSET
0,2
FORMULA
Euler transform of length 6 sequence [2, -4, 0, 0, 0, 1].
a(n) = 2 * b(n) where b(n) is multiplicative with b(2^e) = -1/2 if e>0, b(3^e) = -2 if e>0, b(p^e) = 1 if p>3.
Expansion of 1 + 2*x / (1 - x) - 3*x^2 / (1 - x^2) - 6*x^3 / (1 - x^3) + 9*x^6 / (1 - x^6) in powers of x.
G.f.: (1 - x) * (1 + x)^3 / (1 + x^2 + x^4) = (1 - x^2)^4 / ((1 - x)^2 * (1 - x^6)).
a(-n) = a(n). a(n - 6) = a(n) unless n=0. a(n) = -a(n-2) - a(n-4) unless n=0, 2, 4.
EXAMPLE
G.f. = 1 + 2*x - x^2 - 4*x^3 - x^4 + 2*x^5 + 2*x^6 + 2*x^7 - x^8 - 4*x^9 + ...
MATHEMATICA
CoefficientList[Series[(1-x^2)^2*(1+x)^2/(1-x^6), {x, 0, 50}], x] (* G. C. Greubel, Aug 12 2018 *)
a[ n_] := {2, -1, -4, -1, 2, 2}[[Mod[n, 6, 1]]] - Boole[n==0]; (* Michael Somos, Nov 14 2019 *)
PROG
(PARI) {a(n) = [2, 2, -1, -4, -1, 2][n%6 + 1] - (n == 0)};
(PARI) {a(n) = if( n<0, a(-n), polcoeff( (1 + x)^2 * (1 - x^2)^2 / (1 - x^6) + x * O(x^n), n))};
(PARI) {a(n) = if( n<0, a(-n), if( n<1, n==0, sumdiv( n, d, 2*(d==1) - 3*(d==2) - 6*(d==3) + 9*(d==6))))};
(Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-x^2)^2*(1+x)^2/(1-x^6))); // G. C. Greubel, Aug 12 2018
CROSSREFS
Sequence in context: A059147 A091891 A258127 * A070194 A323300 A349128
KEYWORD
sign
AUTHOR
Michael Somos, Apr 04 2012
STATUS
approved