A156174 Period 5: repeat [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, 0, 1, -1, 1, -1, 0
Offset: 0
Examples
G.f. = 1 - x + x^2 - x^3 + x^5 - x^6 + x^7 - x^8 + x^10 - x^11 + x^12 + ...
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.
Programs
-
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 *)
-
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 */
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
Comments