OFFSET
1,4
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A092953(2*n). - Bill McEachen, May 24 2024
MATHEMATICA
Table[Length[Select[Prime[Range[PrimePi[2*n]]], PrimeQ[2*n + #] &]], {n, 100}] (* T. D. Noe, Apr 16 2013 *)
PROG
(PARI) a(n)=my(s); forprime(p=2, 2*n, s+=isprime(2*n+p)); s \\ Charles R Greathouse IV, Dec 19 2011
(C++)
#include <iostream>
using namespace std;
int main()
{ int p[25] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97};
int count, istart = 2;
for(int n=1; n<=25; n++)
{
if(2*n>p[istart]) istart++;
count = 0;
for(int j=1; p[j]<2*n; j++)
for(int i=istart; p[i]-p[j]<=2*n; i++)
if(p[i]-p[j]==2*n) count++;
cout << n << ". " << count << endl;
}
return 0;
} // code for the first 25 integers, James D. Klein, Dec 21 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
James D. Klein, Dec 19 2011
STATUS
approved