%I #14 Mar 01 2014 09:52:32
%S 0,1,1,1,3,4,2,1,2,3,1,1,3,3,1,1,3,2,2,2,4,5,2,5,3,6,4,5,4,1,2,2,6,4,
%T 2,1,3,1,1,5,5,1,6,3,3,7,4,6,1,4,5,3,4,4,7,6,4,7,6,6,1,3,3,5,6,6,3,4,
%U 9,6,4,2,5,3,8,3,3,6,8,6
%N a(n) = |{0 < k < n: pi((k+1)^2) - pi(k^2) and pi(n^2) - pi(k^2) are both prime}|, where pi(x) denotes the number of primes not exceeding x.
%C Conjecture: (i) a(n) > 0 for all n > 1.
%C (ii) If n > 4, then pi(n^2) + pi(k^2) is prime for some k = 2, ..., n-1.
%C (iii) If n > 0 is not a divisor of 12, then n^2 + pi(k^2) is prime for some k = 2, ..., n-1.
%H Zhi-Wei Sun, <a href="/A238570/b238570.txt">Table of n, a(n) for n = 1..5000</a>
%H Zhi-Wei Sun, <a href="http://arxiv.org/abs/1402.6641">Problems on combinatorial properties of primes</a>, arXiv:1402.6641, 2014.
%e a(8) = 1 since pi(8^2) - pi(7^2) = 18 - 15 = 3 is prime.
%e a(61) = 1 since pi(27^2) - pi(26^2) = 129 - 122 = 7 and pi(61^2) - pi(26^2) = 519 - 122 = 397 are both prime.
%e a(86) = 1 since pi(3^2) - pi(2^2) = 4 - 2 = 2 and pi(86^2) - pi(2^2) = 939 - 2 = 937 are both prime.
%t p[k_,n_]:=PrimeQ[PrimePi[(k+1)^2]-PrimePi[k^2]]&&PrimeQ[PrimePi[n^2]-PrimePi[k^2]]
%t a[n_]:=Sum[If[p[k,n],1,0],{k,1,n-1}]
%t Table[a[n],{n,1,80}]
%Y Cf. A000040, A000720, A237657, A237595, A238568.
%K nonn
%O 1,5
%A _Zhi-Wei Sun_, Feb 28 2014