A053793 n^2+n modulo 7.
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
Links
- Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 0, 1).
Programs
-
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 *)
-
PARI
A053793(n)=[0, 2, 6, 5, 6, 2, 0][n%7+1] \\ - M. F. Hasler, Aug 27 2012
Extensions
More terms from James Sellers, Apr 08 2000
Comments