|
|
A105368
|
|
Expansion of (1-x-x^3+x^4)/(1-x^5).
|
|
4
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
Period 5: repeat [1,-1,0,-1,1]. Partial sums are A105367.
|
|
LINKS
|
|
|
FORMULA
|
G.f.: (1-x)*(1-x^3)/(1-x^5).
a(n) = (1/2-sqrt(5)/10)*cos(4*Pi*n/5)-sqrt(1/2+sqrt(5)/10)*sin(4*Pi*n/5)+(1/2+sqrt(5)/10)*cos(2*Pi*n/5)-sqrt(1/2-sqrt(5)/10)*sin(2*Pi*n/5).
a(n) = -a(n-1) -a(n-2) -a(n-3) -a(n-4), n>4.
G.f.: (1-x)*(1+x+x^2)/(1+x+x^2+x^3+x^4).
(End)
a(n) = -sign( (n+3) mod 5)*(-1)^floor(-2n/5-4/5). - Wesley Ivan Hurt, Apr 28 2015
Euler transform of length 5 sequence [ -1, 0, -1, 0, 1]. - Michael Somos, Jun 16 2015
a(n) = b(2*n + 1) where b() is multiplicative with b(2^e) = b(5^e) = 0^e, b(p^e) = 1 if p == 1, 9 (mod 10), b(p^e) = (-1)^e if p == 3, 7 (mod 10). - Michael Somos, Jun 16 2015
|
|
EXAMPLE
|
G.f. = 1 - x - x^3 + x^4 + x^5 - x^6 - x^8 + x^9 + x^10 - x^11 - x^13 + ...
G.f. = q - q^3 - q^7 + q^9 + q^11 - q^13 - q^17 + q^19 + q^21 - q^23 + ...
|
|
MAPLE
|
|
|
MATHEMATICA
|
CoefficientList[Series[(1 - x - x^3 + x^4)/(1 - x^5), {x, 0, 100}], x] (* Vincenzo Librandi, Apr 29 2015 *)
a[ n_] := {-1, 0, -1, 1, 1}[[Mod[n, 5, 1]]]; (* Michael Somos, Jun 16 2015 *)
|
|
PROG
|
(Magma) &cat [[1, -1, 0, -1, 1]: n in [1..20]] /* or */ I:=[1, -1, 0, -1]; [n le 4 select I[n] else -Self(n-1)-Self(n-2)-Self(n-3)-Self(n-4): n in [1..100]]; // Vincenzo Librandi, Apr 29 2015
(PARI) {a(n) = [ 1, -1, 0, -1, 1][n%5 + 1]}; /* Michael Somos, Jun 16 2015 */
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|