A070462 a(n) = n^2 mod 40.
0, 1, 4, 9, 16, 25, 36, 9, 24, 1, 20, 1, 24, 9, 36, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 36, 9, 24, 1, 20, 1, 24, 9, 36, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 36, 9, 24, 1, 20, 1, 24, 9, 36, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 36, 9, 24, 1, 20, 1, 24, 9, 36, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- 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, 1).
Programs
-
Mathematica
Table[Mod[n^2,40],{n,0,200}] (* Vladimir Joseph Stephan Orlovsky, Apr 27 2011 *) PowerMod[Range[0,90],2,40] (* Harvey P. Dale, Oct 20 2013 *)
-
PARI
a(n)=n^2%40 \\ Charles R Greathouse IV, Apr 06 2016
Formula
a(n) = a(n-20). - G. C. Greubel, Mar 25 2016