OFFSET
0,1
COMMENTS
C(n) := a(n+4) appears in the formula 2*exp(2*Pi*n*i/5) = (A(n) + B(n)*phi) + (C(n) + D(n)*phi)*sqrt(2 + phi)*i, with the golden section phi, i = sqrt(-1) and A(n) = A164116(n+5), B(n) = A080891(n) and D(n) = A010891(n+3) for n >= 0. See a comment on A164116(n+5). - Wolfdieter Lang, Feb 26 2014
With offset 1 this is a strong elliptic divisibility sequence t_n as given in [Kimberling, p. 16] where x = -1, y = 1, z = 1. - Michael Somos, Oct 17 2018
REFERENCES
Arthur Gill, Linear Sequential Circuits, McGraw-Hill, 1966, Eq. (17-10).
LINKS
Index entries for linear recurrences with constant coefficients, signature (-1,-1,-1,-1).
C. Kimberling, Strong divisibility sequences and some conjectures, Fib. Quart., 17 (1979), 13-17.
FORMULA
G.f.: (1+x^2)/(1 + x + x^2 + x^3 + x^4).
Sum_{i=0..n} a(i) = A198517(n). - Bruno Berselli, Nov 02 2011
From Wesley Ivan Hurt, May 31 2015: (Start)
a(n) + a(n-1) + a(n-2) + a(n-3) + a(n-4) = 0 for n > 4.
a(n) = Sum_{i=0..3} A011558(n+2+i)*(-1)^i. (End)
Euler transform of length 5 sequence [-1, 1, 0, -1, 1]. - Michael Somos, Jun 17 2015
G.f.: (1-x)*(1-x^4)/((1-x^2)*(1-x^5)). - Michael Somos, Jun 17 2015
a(n) = -a(-2-n) = a(n+5) for all n in Z. - Michael Somos, Jun 17 2015
a(n) = (2/5) * (cos(4*(n-2)*Pi/5) + cos(2*n*Pi/5) + cos(4*n*Pi/5) - cos(2*(n-3)*Pi/5) - cos(4*(n-3)*Pi/5) - cos(2*(n-1)*Pi/5) - cos(4*(n-1)*Pi/5) - cos((2*n+1)*Pi/5)). - Wesley Ivan Hurt, Sep 26 2018
a(n) = (-1)^n * A099443(n). - Michael Somos, Oct 17 2018
a(5*n) = a(5*n + 2) = 1, a(5*n + 1) = a(5*n + 3) = -1, a(5*n + 4) = 0 for all n in Z. - Michael Somos, Nov 27 2019
EXAMPLE
G.f. = 1 - x + x^2 - x^3 + x^5 - x^6 + x^7 - x^8 + x^10 - x^11 + x^12 + ...
MAPLE
A156174:=n->[1, -1, 1, -1, 0][(n mod 5)+1]: seq(A156174(n), n=0..100); # Wesley Ivan Hurt, May 31 2015
MATHEMATICA
CoefficientList[Series[(1 + x^2)/(1 + x + x^2 + x^3 + x^4), {x, 0, 100}], x] (* Wesley Ivan Hurt, May 31 2015 *)
a[ n_] := { -1, 1, -1, 0, 1}[[Mod[n, 5, 1]]]; (* Michael Somos, Jun 17 2015 *)
a[ n_] := (-1)^Mod[n, 5] Sign @ Mod[n + 1, 5]; (* Michael Somos, Jun 17 2015 *)
PROG
(PARI) a(n)=[1, -1, 1, -1, 0][n%5+1] \\ Charles R Greathouse IV, Oct 28 2011
(PARI) {a(n) = (-1)^(n%5) * sign((n+1)%5)}; /* Michael Somos, Jun 17 2015 */
CROSSREFS
KEYWORD
sign,easy
AUTHOR
N. J. A. Sloane, Nov 06 2009
STATUS
approved