OFFSET
1,1
COMMENTS
LINKS
Karl V. Keller, Jr., Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Twin Primes
EXAMPLE
913638 is the average of the four consecutive primes 913589, 913637, 913639, 913687.
2763882 is the average of the four consecutive primes 2763833, 2763881, 2763883, 2763931.
MATHEMATICA
Mean/@Select[Partition[Prime[Range[2325200]], 4, 1], Differences[#]=={48, 2, 48}&] (* Harvey P. Dale, Feb 10 2024 *)
PROG
(Python)
from sympy import isprime, prevprime, nextprime
for i in range(0, 60000001, 6):
..if isprime(i-1) and isprime(i+1) and prevprime(i-1) == i-49 and nextprime(i+1) == i+49: print (i, end=', ')
(PARI) is(n)=isprime(n-1) && isprime(n+1) && precprime(n-2)==n-49 && nextprime(n+2)==n+49 \\ Charles R Greathouse IV, Jun 08 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Karl V. Keller, Jr., May 20 2016
STATUS
approved