OFFSET
1,5
COMMENTS
Conjecture: (i) a(n) > 0 for all n > 1.
(ii) If n > 4, then pi(n^2) + pi(k^2) is prime for some k = 2, ..., n-1.
(iii) If n > 0 is not a divisor of 12, then n^2 + pi(k^2) is prime for some k = 2, ..., n-1.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..5000
Zhi-Wei Sun, Problems on combinatorial properties of primes, arXiv:1402.6641, 2014.
EXAMPLE
a(8) = 1 since pi(8^2) - pi(7^2) = 18 - 15 = 3 is prime.
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.
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.
MATHEMATICA
p[k_, n_]:=PrimeQ[PrimePi[(k+1)^2]-PrimePi[k^2]]&&PrimeQ[PrimePi[n^2]-PrimePi[k^2]]
a[n_]:=Sum[If[p[k, n], 1, 0], {k, 1, n-1}]
Table[a[n], {n, 1, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Feb 28 2014
STATUS
approved