login
A098015
Indices x such that (1/2)(prime(x+1) - prime(x)) is prime.
3
4, 6, 8, 9, 11, 12, 14, 15, 16, 18, 19, 21, 22, 23, 25, 27, 29, 30, 31, 32, 34, 36, 37, 38, 39, 40, 42, 44, 48, 50, 51, 53, 54, 55, 56, 58, 59, 61, 62, 63, 65, 66, 67, 68, 70, 71, 73, 74, 75, 76, 78, 80, 82, 84, 85, 86, 88, 90, 93, 95, 96, 100, 101, 102, 103, 105, 106, 107, 108
OFFSET
1,1
LINKS
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
Sequence in context: A121150 A049579 A137242 * A180638 A213320 A024887
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Sep 09 2004
STATUS
approved