OFFSET
0
COMMENTS
LINKS
Index entries for linear recurrences with constant coefficients, signature (-1,-1,-1,-1,-1,-1).
FORMULA
G.f.: x*(1 - x^5)/(1 - x^7).
a(n+7) = a(n), n >= 0, a(k) = 0 for k = 0, 2, 3, 4, 5 and a(1) = -a(6) = 1.
From Wesley Ivan Hurt, Jul 18 2016: (Start)
a(n) + a(n-1) + a(n-2) + a(n-3) + a(n-4) + a(n-5) + a(n-6) = 0 for n>5.
a(n) = floor(n/7) - floor((1+n)/7) - floor((5+n)/7) + floor((6+n)/7). (End)
MAPLE
seq(op([0, 1, 0, 0, 0, 0, -1]), n=0..20); # Wesley Ivan Hurt, Jul 18 2016
MATHEMATICA
PadRight[{}, 100, {0, 1, 0, 0, 0, 0, -1}] (* Wesley Ivan Hurt, Jul 18 2016 *)
PROG
(PARI) a(n)=(n+1)^6%7 - (n+6)^6%7 \\ Charles R Greathouse IV, Jul 17 2016
(Magma) &cat [[0, 1, 0, 0, 0, 0, -1]^^20]; // Wesley Ivan Hurt, Jul 18 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Wolfdieter Lang, Feb 27 2014
STATUS
approved