login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A070441
n^2 mod 19.
4
0, 1, 4, 9, 16, 6, 17, 11, 7, 5, 5, 7, 11, 17, 6, 16, 9, 4, 1, 0, 1, 4, 9, 16, 6, 17, 11, 7, 5, 5, 7, 11, 17, 6, 16, 9, 4, 1, 0, 1, 4, 9, 16, 6, 17, 11, 7, 5, 5, 7, 11, 17, 6, 16, 9, 4, 1, 0, 1, 4, 9, 16, 6, 17, 11, 7, 5, 5, 7, 11, 17, 6, 16, 9, 4, 1, 0, 1, 4, 9, 16, 6, 17, 11, 7, 5, 5, 7, 11
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
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
A070441:=n->n^2 mod 19: seq(A070441(n), n=0..100); # Wesley Ivan Hurt, Aug 12 2014
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