OFFSET
0,3
COMMENTS
x^2 - k = 19*y, where x, y and k are integers, has solutions if and only if k mod 19 is an element of {0,1,4,5,6,7,9,11,16,17}. - Vincenzo Librandi, Aug 12 2014
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
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, 1).
FORMULA
a(n+19) = a(n).
a(19*k - n) = a(n). - Robert Israel, Aug 12 2014
MAPLE
MATHEMATICA
Table[Mod[n^2, 19], {n, 0, 200}] (* Vladimir Joseph Stephan Orlovsky, Apr 23 2011 *)
PowerMod[Range[0, 90], 2, 19] (* Harvey P. Dale, Mar 23 2012 *)
PROG
(Magma) [n^2 mod(19): n in [0..100]]; // Vincenzo Librandi, Aug 12 2014
(PARI) a(n)=n^2%19 \\ Charles R Greathouse IV, Apr 06 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 12 2002
STATUS
approved