OFFSET
0,1
COMMENTS
Periodic with period 13.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1).
FORMULA
G.f.: 1/(1 + x + x^2 + x^3 + ... + x^12). - Ilya Gutkovskiy, Aug 18 2017
MAPLE
with(numtheory, cyclotomic); c := n->series(1/cyclotomic(n, x), x, 80);
MATHEMATICA
f[n_] := (-Mod[n, 13] - Mod[n + 11, 13] + 2 Mod[n + 12, 13])/13; Array[f, 105, 0] (* Or *)
CoefficientList[ Series[ 1/Cyclotomic[13, x], {x, 0, 105}], x] (* Robert G. Wilson v *)
LinearRecurrence[{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 81] (* Ray Chandler, Aug 27 2015 *)
PROG
(PARI) a(n)=n=n%13; if(n>1, 0, if(n, 1, -1)) \\ Charles R Greathouse IV, Mar 10 2011
(Magma) &cat[[1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]: n in [0..10]]; // Vincenzo Librandi, Apr 03 2014
CROSSREFS
KEYWORD
sign,easy
AUTHOR
STATUS
approved