OFFSET
1,3
COMMENTS
Conjecture: a(n)>0 for all n>0.
This is a refinement of Legendre's conjecture that for each n=1,2,3,... the interval (n^2,(n+1)^2) contains a prime.
We have verified the conjecture for n up to 10^9.
Zhi-Wei Sun also made some similar conjectures involving primes and Legendre symbols, below are few examples:
(1) If n>10 then there is a prime p between n^2 and (n+1)^2 with (n/p) = ((1-n)/p) = 1. If n>2 is different from 7 and 17, then there is a prime p between n^2 and (n+1)^2 with (n/p) = ((n+1)/p) = 1. If n>1 is not equal to 27, then there is a prime p between n^2 and (n+1)^2 with (n/p) = ((n+2)/p) = 1.
(2) If n>2 is different from 6, 12, 58, then there is a prime p between n^2 and n^2+n such that (n/p) = 1. If n>20 is not a square, and different from 37 and 77, then there is a prime p between n^2 and n^2+n such that (n/p) = -1.
(3) For each n=15,16,... there is a prime p between n and 2n such that (n/p) = 1. If n>0 is not a square, then
there is a prime p between n and 2n such that (n/p) = -1.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Zhi-Wei Sun, Conjectures involving primes and quadratic forms, arXiv:1211.1588.
EXAMPLE
a(10)=1 since 107 is the only prime p between 10^2 and 11^2 with (10/p) = 1.
MATHEMATICA
a[n_]:=a[n]=Sum[If[n^2+k>2&&PrimeQ[n^2+k]==True&&JacobiSymbol[n, n^2+k]==1, 1, 0], {k, 1, 2n}]
Do[Print[n, " ", a[n]], {n, 1, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Dec 29 2012
STATUS
approved