login
Number of primes p with A020330(n) < p < A020330(n+1).
1

%I #21 Dec 08 2017 18:10:48

%S 2,2,5,3,2,2,14,4,3,3,4,1,4,3,45,3,6,6,6,5,3,6,4,5,5,6,3,5,4,6,140,12,

%T 5,9,8,11,8,5,8,8,12,8,9,7,7,8,7,6,7,9,10,5,8,11,9,8,8,7,7,9,9,7,471,

%U 14,12,15,17,15,14,13,15,14,17,12,16,16,9,17,14,12

%N Number of primes p with A020330(n) < p < A020330(n+1).

%C Conjecture: a(n) > 0 for all n > 0, and a(n) = 1 only for n = 12.

%C The terms of A020330 are usually called "binary squares". Our conjecture is an analog of Legendre's conjecture that for each n = 1,2,3,... there is a prime between n^2 and (n+1)^2.

%C Those a(2^n-1) = pi(2*4^n+2^n) - pi(4^n) are relatively large, where pi(x) is the prime-counting function given by A000720.

%C We have verified that a(n) > 0 for all n = 1..2*10^7.

%H Zhi-Wei Sun, <a href="/A293833/b293833.txt">Table of n, a(n) for n = 1..10000</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Legendre%27s_conjecture">Legendre's conjecture</a>

%e a(1) = 2 since 5 and 7 are the only primes in the interval (A020330(1), A020330(2)) = (3, 10).

%e a(12) = 1 since 211 is the only prime greater than A020330(12) = 204 and smaller than A020330(13) = 221.

%e a(8191) = a(2^13 - 1) = pi(2^27 + 2^13) - pi(2^26) = 3646196.

%t f[n_]:=f[n]=(2^(Floor[Log[2,n]]+1)+1)*n;

%t a[n_]:=a[n]=PrimePi[f[n+1]-1]-PrimePi[f[n]];

%t Table[a[n],{n,1,80}]

%Y Cf. A000040, A000720, A014085, A020330.

%K nonn

%O 1,1

%A _Zhi-Wei Sun_, Oct 16 2017