OFFSET
1,3
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
MATHEMATICA
lp[n_]:=Module[{p=Prime[PrimePi[n]]}, p=If[p==n, NextPrime[p, -1], p]; While[ !IntegerQ[ Sqrt[Mod[n, p]]], p=NextPrime[p, -1]]; p]; Join[{0, 0}, Array[lp, 80, 3]] (* Harvey P. Dale, Apr 23 2022 *)
PROG
(PARI) { for (n=1, 1000, p=precprime(n - 1);; while (p > 0 && !issquare(n%p), p=precprime(p - 1)); write("b065988.txt", n, " ", p) ) } \\ Harry J. Smith, Nov 05 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Dec 10 2001
STATUS
approved