OFFSET
1,4
COMMENTS
a(n)=0 for n in A007921.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(12)=5 because only the 5 primes p=5,7,11,17,19 below 24 form other primes p+12 = 17,19,23,29,31.
MAPLE
P:= select(isprime, [2, seq(i, i=3..3000, 2)]);
f:= proc(n) local m, R;
m:= ListTools:-BinaryPlace(P, 3*n);
R:= convert(P[1..m], set);
nops((R -~ n) intersect R)
end proc:
f(1):= 1:
map(f, [$1..1000]); # Robert Israel, Mar 22 2023
MATHEMATICA
Table[Length[Select[Select[Range[2*n], PrimeQ], PrimeQ[ #+n]&]], {n, 100}] (* Ryan Propper, Nov 12 2006 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Lekraj Beedassy, Aug 23 2006
EXTENSIONS
More terms from Ryan Propper, Nov 12 2006
STATUS
approved