A164116 Expansion of (1 - x) * (1 - x^4) / (1 - x^5) in powers of x.
1, -1, 0, 0, -1, 2, -1, 0, 0, -1, 2, -1, 0, 0, -1, 2, -1, 0, 0, -1, 2, -1, 0, 0, -1, 2, -1, 0, 0, -1, 2, -1, 0, 0, -1, 2, -1, 0, 0, -1, 2, -1, 0, 0, -1, 2, -1, 0, 0, -1, 2, -1, 0, 0, -1, 2, -1, 0, 0, -1, 2, -1, 0, 0, -1, 2, -1, 0, 0, -1, 2, -1, 0, 0, -1, 2, -1, 0, 0, -1, 2, -1, 0, 0, -1, 2, -1, 0, 0, -1, 2, -1, 0, 0, -1, 2, -1, 0, 0, -1, 2, -1, 0, 0, -1
Offset: 0
Examples
G.f. = 1 - x - x^4 + 2*x^5 - x^6 - x^9 + 2*x^10 - x^11 - x^14 + 2*x^15 - x^16 + ... exp(2*Pi*3*I/5) = (0 - phi) + (1 - phi)*sqrt(2+phi)*I, with phi = (1+sqrt(5))/2. - _Wolfdieter Lang_, Feb 26 2014
Links
- G. C. Greubel, Table of n, a(n) for n = 0..10000
- Index entries for linear recurrences with constant coefficients, signature (-1, -1, -1, -1).
Programs
-
Magma
m:=50; R
:=PowerSeriesRing(Integers(), m); Coefficients(R!((1 - x^4)/(1+x+x^2+x^3+x^4))); // G. C. Greubel, Sep 22 2018 -
Mathematica
CoefficientList[Series[(1-x)(1-x^4)/(1-x^5),{x,0,110}],x] (* Harvey P. Dale, Sep 25 2013 *)
-
PARI
{a(n) = -(n==0) + [2, -1, 0, 0, -1][n%5 + 1]};
Formula
Euler transform of length 5 sequence [-1, 0, 0, -1, 1].
a(n) = a(-n) for all n in Z. a(n+5) = a(n) unless n=0 or n=-5.
G.f.: (1 - x^4)/(1 + x + x^2 + x^3 + x^4).
a(n) = 2*0^mod(n,5) - 0^n - mod(mod(n+2,5),2). - Wesley Ivan Hurt, Apr 28 2015
Comments