login
A112300
Expansion of x * (1 - x)^2 * (1 - x^2) / (1 - x^6) in powers of x.
2
1, -2, 0, 2, -1, 0, 1, -2, 0, 2, -1, 0, 1, -2, 0, 2, -1, 0, 1, -2, 0, 2, -1, 0, 1, -2, 0, 2, -1, 0, 1, -2, 0, 2, -1, 0, 1, -2, 0, 2, -1, 0, 1, -2, 0, 2, -1, 0, 1, -2, 0, 2, -1, 0, 1, -2, 0, 2, -1, 0, 1, -2, 0, 2, -1, 0, 1, -2, 0, 2, -1, 0, 1, -2, 0, 2, -1, 0, 1, -2, 0, 2, -1, 0, 1, -2, 0, 2, -1, 0, 1, -2, 0, 2, -1, 0, 1, -2, 0, 2, -1, 0, 1, -2, 0
OFFSET
1,2
FORMULA
Euler transform of length 6 sequence [ -2, -1, 0, 0, 0, 1].
Multiplicative with a(2^e) = 2*(-1)^e if e>0, a(3^e) = 0 if e>0, a(p^e) = 1 if p == 1 (mod 6), a(p^e) = (-1)^e if p == 5 (mod 6).
G.f.: x * (1 - x)^2 / ((1 - x + x^2) * (1 + x + x^2)). - Michael Somos, May 04 2015
G.f.: -(f(x) + 3*f(-x)) / 2 where f(x) := x / (1 - x + x^2). - Michael Somos, May 04 2015
a(n) = -a(3 - n) = a(n+6), a(3*n) = 0 for all n in Z.
EXAMPLE
G.f. = x - 2*x^2 + 2*x^4 - x^5 + x^7 - 2*x^8 + 2*x^10 - x^11 + x^13 - 2*x^14 + ...
MATHEMATICA
a[ n_] := {0, 1, -2, 0, 2, -1} [[ Mod[n, 6] + 1]]; (* Michael Somos, May 04 2015 *)
PadRight[{}, 120, {1, -2, 0, 2, -1, 0}] (* Harvey P. Dale, Jul 09 2019 *)
PROG
(PARI) {a(n) = [0, 1, -2, 0, 2, -1][n%6 + 1]};
CROSSREFS
Sequence in context: A061264 A193680 A186809 * A049239 A194305 A036580
KEYWORD
sign,easy,mult
AUTHOR
Michael Somos, Sep 02 2005
STATUS
approved