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”).

A053793
n^2+n modulo 7.
3
0, 2, 6, 5, 6, 2, 0, 0, 2, 6, 5, 6, 2, 0, 0, 2, 6, 5, 6, 2, 0, 0, 2, 6, 5, 6, 2, 0, 0, 2, 6, 5, 6, 2, 0, 0, 2, 6, 5, 6, 2, 0, 0, 2, 6, 5, 6, 2, 0, 0, 2, 6, 5, 6, 2, 0, 0, 2, 6, 5, 6, 2, 0, 0, 2, 6, 5, 6, 2, 0, 0, 2, 6, 5, 6, 2, 0, 0, 2, 6, 5, 6, 2, 0, 0, 2, 6, 5, 6, 2, 0, 0, 2, 6, 5, 6, 2, 0, 0, 2, 6, 5, 6, 2, 0
OFFSET
0,2
COMMENTS
Pronic residues (mod m) are analogous to quadratic residues.
Periodic with period 7.
MATHEMATICA
Table[Mod[n^2+n, 7], {n, 0, 120}] (* Harvey P. Dale, Aug 26 2012 *)
LinearRecurrence[{0, 0, 0, 0, 0, 0, 1}, {0, 2, 6, 5, 6, 2, 0}, 105] (* Ray Chandler, Aug 26 2015 *)
PROG
(PARI) A053793(n)=[0, 2, 6, 5, 6, 2, 0][n%7+1] \\ - M. F. Hasler, Aug 27 2012
CROSSREFS
Sequence in context: A067548 A354509 A245698 * A371324 A076187 A019655
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