login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Let p = prime(n). a(n) = number of primes q less than p, such that both p-q+1 and p-q-1 are primes.
0

%I #7 Apr 23 2013 13:37:07

%S 0,0,0,1,2,1,3,2,4,3,2,3,4,3,5,4,5,3,3,6,5,6,6,6,3,7,5,5,6,9,4,8,3,7,

%T 7,5,6,5,7,6,8,8,9,5,10,9,12,8,6,8,9,13,10,12,9,8,12,9,7,14,9,10,8,13,

%U 9,9,11,10,6,13,12,11,8,9,17,9,12,6,11,14

%N Let p = prime(n). a(n) = number of primes q less than p, such that both p-q+1 and p-q-1 are primes.

%e 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.

%t 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}]

%Y Cf. A224748, A224908, A224979, A224980.

%K nonn

%O 1,5

%A _Jayanta Basu_, Apr 22 2013