OFFSET
1,18
COMMENTS
Conjecture: (i) a(n) > 0 for all n > 8.
(ii) For any integer n > 1 there is a prime p <= n such that n + pi(p) is prime. Also, for n > 5 there is a prime p with n < p < 2*n such that pi(p) is prime.
(iii) For each n > 20, there is a prime p with n < p < 2*n such that pi(p^2) is prime.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
EXAMPLE
a(4) = 1 since pi(6) = 3 and pi(6^2) = 11 are both prime.
a(10) = 1 since pi(17) = 7 and pi(17^2) = 61 are both prime.
a(17) = 1 since pi(33) = 11 and pi(33^2) = 181 are both prime.
MATHEMATICA
q[n_]:=PrimeQ[PrimePi[n]]&&PrimeQ[PrimePi[n^2]]
a[n_]:=Sum[If[q[m], 1, 0], {m, n+1, 2n-1}]
Table[a[n], {n, 1, 70}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Feb 10 2014
STATUS
approved