OFFSET
1,2
EXAMPLE
a(4)=16 because, of the five numbers having 4 quadratic residues (6,7,9,12,16), the greatest is 16.
MATHEMATICA
t=Table[Length[Union[Mod[Range[0, n/2]^2, n]]], {n, 10000}]; Table[pos=Flatten[Position[t, n]]; If[Length[pos]==0, 0, Last[pos]], {n, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Aug 25 2005
STATUS
approved