OFFSET

1,5

EXAMPLE

For n=3, p=5, there are no primes q(<5) such that both 5-q+1 and 5-q-1 are primes and hence a(3)=0. Also for n=5, p=11, there are a(5)=2 solutions 5,7 since 11-5+1=7, 11-5-1=5 and 11-7+1=5, 11-7-1=3.

MATHEMATICA

Table[p = Prime[n]; c = 0; i = 1; While[i < n, p1 = p - Prime[i]; If[PrimeQ[p1 + 1] && PrimeQ[p1 - 1], c = c + 1]; i++]; c, {n, 80}]

CROSSREFS

KEYWORD

nonn

AUTHOR

Jayanta Basu, Apr 22 2013

STATUS

approved