A185150 Number of odd primes p between n^2 and (n+1)^2 with (n/p) = 1, where (-) is the Legendre symbol.
1, 1, 2, 3, 2, 2, 2, 3, 3, 1, 4, 2, 4, 3, 5, 7, 2, 3, 4, 6, 5, 3, 3, 4, 8, 5, 4, 5, 4, 4, 6, 6, 6, 4, 9, 9, 7, 7, 5, 6, 7, 5, 9, 5, 7, 3, 9, 6, 10, 6, 10, 6, 8, 8, 7, 7, 10, 3, 12, 8, 7, 10, 8, 14, 11, 7, 10, 10, 5, 9, 11, 8, 7, 9, 9, 18, 11, 11, 12, 9, 20, 6, 13, 6, 10, 9, 13, 9, 8, 10, 10, 12, 12, 6, 13, 9, 12, 12, 8, 23
Offset: 1
Keywords
Examples
a(10)=1 since 107 is the only prime p between 10^2 and 11^2 with (10/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.
Programs
-
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}]
Comments