OFFSET
1,4
COMMENTS
Conjecture: a(n) > 0 for all n > 1, and a(n) = 1 only for n = 2, 3, 11, 44, 55, 149, 371.
This suggests that there are infinitely many prime pairs {p, q} with 2*pi(p) + 1 = pi(q) such that prime(p) - p + 1 and prime(q) - q + 1 are both prime.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Zhi-Wei Sun, Problems on combinatorial properties of primes, arXiv:1402.6641, 2014.
EXAMPLE
a(3) = 1 since 3 = 1 + 2 with prime(prime(1)) - prime(1) + 1 = prime(2) - 2 + 1 = 2, prime(prime(2*1+1)) - prime(2*1+1) + 1 = prime(5) - 5 + 1 = 7 and prime(prime(2)) - prime(2) + 1 = prime(3) - 3 + 1 = 3 all prime.
a(371) = 1 since 371 = 66 + 305 with prime(prime(66)) - prime(66) + 1 = prime(317) - 317 + 1 = 2099 - 316 = 1783, prime(prime(2*66+1)) - prime(2*66+1) + 1 = prime(751) - 751 + 1 = 5701 - 750 = 4951 and prime(prime(305)) - prime(305) + 1 = prime(2011) - 2011 + 1 = 17483 - 2010 = 15473 all prime.
MATHEMATICA
pq[k_]:=PrimeQ[Prime[Prime[k]]-Prime[k]+1]
a[n_]:=Sum[If[pq[k]&&pq[2k+1]&&pq[n-k], 1, 0], {k, 1, n-1}]
Table[a[n], {n, 1, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Mar 05 2014
STATUS
approved