OFFSET
1,1
LINKS
Karl V. Keller, Jr., Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Twin Primes
EXAMPLE
7950 is the average of the four consecutive primes 7937, 7949, 7951, 7963.
10500 is the average of the four consecutive primes 10487, 10499, 10501, 10513.
PROG
(Python)
from sympy import isprime, prevprime, nextprime
for i in range(0, 300001, 2):
.. if isprime(i-1) and isprime(i+1):
....if prevprime(i-1) == i-13 and nextprime(i+1) == i+13 : print (i, end=', ')
(Perl) use ntheory ":all"; say join ", ", map { $_+1 } grep { next_prime($_+2)-$_==14 } grep { $_-prev_prime($_)==12 } @{twin_primes(1e6)}; # Dana Jacobsen, Oct 03 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Karl V. Keller, Jr., Aug 06 2015
STATUS
approved