OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,1).
FORMULA
From Bruno Berselli, Dec 02 2010: (Start)
G.f.: x*(2+x+2*x^2)/(1-x^5);
a(n) = a(n-5) for n > 4. (End)
MATHEMATICA
Table[Mod[n^2+n, 5], {n, 0, 110}] (* or *) PadRight[{}, 120, {0, 2, 1, 2, 0}] (* Harvey P. Dale, Sep 12 2017 *)
PROG
(Magma) [(n^2+n) mod 5 : n in [0..100]]; // Wesley Ivan Hurt, Apr 20 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Stuart M. Ellerstein (ellerstein(AT)aol.com), Mar 27 2000
EXTENSIONS
More terms from James A. Sellers, Apr 08 2000
STATUS
approved