OFFSET
2,5
COMMENTS
Sequence A063987 lists the quadratic residues (mod p) for each prime p. When p=1 (mod 4), there are an equal number of quadratic residues less than p/2 and greater than p/2. When p=3 (mod 4), there are always more quadratic residues less than p/2 than greater than p/2.
LINKS
EXAMPLE
The quadratic residues of 19, the 8th prime, are 1, 4, 5, 6, 7, 9, 11, 16, 17. Three of these are greater than 19/2. Hence a(8)=3.
MATHEMATICA
Table[p=Prime[n]; Length[Select[Range[(p+1)/2, p-1], JacobiSymbol[ #, p]==1&]], {n, 2, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, May 21 2010
STATUS
approved