login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A053796
a(n) = (n^2+n) modulo 5.
2
0, 2, 1, 2, 0, 0, 2, 1, 2, 0, 0, 2, 1, 2, 0, 0, 2, 1, 2, 0, 0, 2, 1, 2, 0, 0, 2, 1, 2, 0, 0, 2, 1, 2, 0, 0, 2, 1, 2, 0, 0, 2, 1, 2, 0, 0, 2, 1, 2, 0, 0, 2, 1, 2, 0, 0, 2, 1, 2, 0, 0, 2, 1, 2, 0, 0, 2, 1, 2, 0, 0, 2, 1, 2, 0, 0, 2, 1, 2, 0, 0, 2, 1, 2, 0, 0, 2, 1, 2, 0, 0, 2, 1, 2, 0, 0, 2, 1, 2, 0, 0, 2, 1, 2, 0
OFFSET
0,2
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
Cf. A053793.
Sequence in context: A050601 A101650 A287411 * A029391 A058087 A240753
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