OFFSET
0,1
COMMENTS
Period 5: repeat [1,-1,0,-1,1]. Partial sums are A105367.
Binomial transform of A105369. - R. J. Mathar, Jul 29 2010
LINKS
Michael Somos, Rational Function Multiplicative Coefficients
Index entries for linear recurrences with constant coefficients, signature (-1,-1,-1,-1).
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).
From R. J. Mathar, Jul 29 2010: (Start)
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
a(n) = 2 - ( (n^2+n+1) mod 5 ). - Wesley Ivan Hurt, May 31 2015
Euler transform of length 5 sequence [ -1, 0, -1, 0, 1]. - Michael Somos, Jun 16 2015
a(n) = a(-1-n) for all n in Z. - 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 + ...
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]]; // Vincenzo Librandi, Apr 29 2015
(Magma) 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
Paul Barry, Apr 01 2005
STATUS
approved