OFFSET
0,3
COMMENTS
Periodic with period length 29. - Ray Chandler, Dec 18 2023
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).
FORMULA
a(n) = a(n-29). - G. C. Greubel, Mar 24 2016
EXAMPLE
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.
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 *)
PROG
(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
(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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 12 2002
EXTENSIONS
Incorrect g.f. removed by Georg Fischer, May 15 2019
STATUS
approved