OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
Difference between prime(4) and prime(4+1) = 4. 1/2(4) = 2. So 4 is first entry in the table.
MAPLE
R:= NULL: count:= 0:
p:= 3:
for i from 2 while count < 100 do
q:= p; p:= nextprime(p);
if isprime((p-q)/2) then R:= R, i; count:= count+1 fi
od:
R; # Robert Israel, Sep 27 2023
MATHEMATICA
Flatten[Position[(#[[2]]-#[[1]])/2&/@Partition[Prime[Range[200]], 2, 1], _?PrimeQ]] (* Harvey P. Dale, Dec 14 2012 *)
PROG
(PARI) f(n) = for(x=1, n, y=prime(x+1)-prime(x); if(isprime(y\2), print1(x", ")))
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Sep 09 2004
STATUS
approved