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

A163818
Expansion of (1 - x) * (1 - x^6) / ((1 - x^2) * (1 - x^5)) in powers of x.
3
1, -1, 1, -1, 1, 0, -1, 1, -1, 1, 0, -1, 1, -1, 1, 0, -1, 1, -1, 1, 0, -1, 1, -1, 1, 0, -1, 1, -1, 1, 0, -1, 1, -1, 1, 0, -1, 1, -1, 1, 0, -1, 1, -1, 1, 0, -1, 1, -1, 1, 0, -1, 1, -1, 1, 0, -1, 1, -1, 1, 0, -1, 1, -1, 1, 0, -1, 1, -1, 1, 0, -1, 1, -1, 1, 0, -1, 1, -1, 1, 0, -1, 1, -1, 1, 0, -1, 1, -1, 1, 0, -1, 1, -1, 1, 0, -1, 1, -1, 1, 0, -1, 1, -1, 1
OFFSET
0,1
FORMULA
Euler transform of length 6 sequence [-1, 1, 0, 0, 1, -1].
a(5*n) = 0 unless n=0. a(5*n + 1) = a(5*n + 3) = -1, a(5*n + 2) = a(5*n + 4) = a(0) = 1.
a(n) = -a(-n) unless n=0. a(n+5) = a(n) unless n=0 or n=-5.
G.f.: (1 + x^2 + x^4) / (1 + x + x^2 + x^3 + x^4).
G.f.: 1 / (1 + x / (1 + x^4 / (1 + x^2))). - Michael Somos, Jan 03 2013
a(n) = (-1)^n * A163812(n). Convolution inverse of A163817.
EXAMPLE
G.f. = 1 - x + x^2 - x^3 + x^4 - x^6 + x^7 - x^8 + x^9 - x^11 + x^12 - x^13 + ...
MATHEMATICA
a[ n_] := Boole[n == 0] + {-1, 1, -1, 1, 0}[[Mod[n, 5, 1]]]; (* Michael Somos, Jun 17 2015 *)
a[ n_] := Boole[n == 0] + (-1)^(n + Quotient[n, 5]) Sign@Mod[n, 5]; (* Michael Somos, Jun 17 2015 *)
CoefficientList[Series[(1 + x^2 + x^4) / (1 + x + x^2 + x^3 + x^4), {x, 0, 100}], x] (* Vincenzo Librandi, Aug 05 2017 *)
PROG
(PARI) {a(n) = (n==0) + [ 0, -1, 1, -1, 1][n%5 + 1]};
(PARI) {a(n) = (n==0) + (-1)^(n + n\5) * kronecker(25, n)};
CROSSREFS
Sequence in context: A167020 A236862 A163812 * A345009 A071040 A336834
KEYWORD
sign,easy
AUTHOR
Michael Somos, Aug 04 2009
STATUS
approved