A070451 a(n) = n^2 mod 29.
0, 1, 4, 9, 16, 25, 7, 20, 6, 23, 13, 5, 28, 24, 22, 22, 24, 28, 5, 13, 23, 6, 20, 7, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 7, 20, 6, 23, 13, 5, 28, 24, 22, 22, 24, 28, 5, 13, 23, 6, 20, 7, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 7, 20, 6, 23, 13, 5, 28, 24, 22, 22, 24, 28, 5, 13, 23, 6, 20
Offset: 0
Examples
5^2 = 25 == 25 (mod 29), so a(5) = 25. 6^2 = 36 == 7 (mod 29), so a(6) = 7. 7^2 = 49 == 20 (mod 29), so a(7) = 20.
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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1).
Crossrefs
Cf. A070451.
Programs
-
GAP
List([0..100],n->PowerMod(n,2,29)); # Muniru A Asiru, Jun 29 2018
-
Magma
[Modexp(n, 2, 29): n in [0..100]]; // Vincenzo Librandi, Jun 30 2018
-
Mathematica
Table[Mod[n^2, 29], {n, 0, 115}] (* Vladimir Joseph Stephan Orlovsky, Apr 27 2011 *) PowerMod[Range[0, 115], 2, 29] (* Alonso del Arte, Jun 29 2018 *)
-
PARI
a(n)=n^2%29 \\ Charles R Greathouse IV, Apr 06 2016
-
Scala
for (i <- 0 to 115) yield (i * i) % 29 // Alonso del Arte, Jun 29 2018
Formula
a(n) = a(n-29). - G. C. Greubel, Mar 24 2016
Extensions
Incorrect g.f. removed by Georg Fischer, May 15 2019
Comments