OFFSET
1,10
COMMENTS
Conjecture: (i) a(n) > 0 for all n > 8, and a(n) = 1 only for n = 9, 34, 35.
(ii) For any integer n > 4, there is a prime p < n such that 3*pi(n-p) - 1, 3*pi(n-p) + 1 and 3*pi(n-p) + 5 are all prime. Also, for each integer n > 8, there is a prime p < n such that 3*pi(n-p) - 1, 3*pi(n-p) + 1 and 3*pi(n-p) - 5 are all prime.
(iii) For any integer n > 6, there is a prime p < n such that phi(n-p) - 1 and phi(n-p) + 1 are both prime, where phi(.) is Euler's totient function.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
EXAMPLE
a(9) = 1 since 2, pi(9-2) - 1 = 3 and pi(9-2) + 1 = 5 are all prime.
a(34) = 1 since 19, pi(34-19) - 1 = pi(15) - 1 = 5 and pi(34-19) + 1 = pi(15) + 1 = 7 are all prime.
a(35) = 1 since 19, pi(35-19) - 1 = pi(16) - 1 = 5 and pi(35-19) + 1 = pi(16) + 1 = 7 are all prime.
MATHEMATICA
TQ[n_]:=PrimeQ[n-1]&&PrimeQ[n+1]
a[n_]:=Sum[If[TQ[PrimePi[n-Prime[k]]], 1, 0], {k, 1, PrimePi[n-1]}]
Table[a[n], {n, 1, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Feb 13 2014
STATUS
approved