OFFSET
1,2
COMMENTS
For primes of the form p=4k+3 (A002145), count numbers in [1,2k+1] which are quadratic residues mod p.
R. K. Guy asks whether there is an elementary proof for the fact that there are always less quadratic residues in the interval [2k+2,4k+2] than in [1,2k+1].
FORMULA
PROG
(PARI) forprime( p=1, 499, p%4==3|next; u=3; c=[1, 0]; for(i=2, p-2, bittest(u, i^2%p) & next; u+=1<<(i^2%p); c[i^2%p*2\p+1]++); print1(c[1]", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Feb 25 2011
STATUS
approved