A070464 a(n) = n^2 mod 42.
0, 1, 4, 9, 16, 25, 36, 7, 22, 39, 16, 37, 18, 1, 28, 15, 4, 37, 30, 25, 22, 21, 22, 25, 30, 37, 4, 15, 28, 1, 18, 37, 16, 39, 22, 7, 36, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 36, 7, 22, 39, 16, 37, 18, 1, 28, 15, 4, 37, 30, 25, 22, 21, 22, 25, 30, 37, 4, 15, 28, 1, 18, 37, 16, 39
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1400
- Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1).
Programs
-
Magma
[n^2 mod 42: n in [0..80]]; // Vincenzo Librandi, Apr 27 2011
-
Mathematica
Table[Mod[n^2,42],{n,0,200}] (* Vladimir Joseph Stephan Orlovsky, Apr 27 2011 *) PowerMod[Range[0,80],2,42] (* Harvey P. Dale, Mar 13 2019 *)
-
PARI
a(n)=n^2%42 \\ Charles R Greathouse IV, Apr 06 2016
Formula
a(n) = a(n-42). - G. C. Greubel, Mar 25 2016