OFFSET
1,1
COMMENTS
The terms ending in 0 belong to A249674 (divisible by 30).
The terms ending in 2 (resp. 8) are congruent to 12 (resp. 18) mod 30.
The numbers n - 40 and n + 1 belong to A126721 (p such that p + 40 is the next prime) and A271981 (p and p + 40 are primes).
The numbers n - 40 and n - 1 belong to A271982 (p and p + 42 are primes).
LINKS
Karl V. Keller, Jr., Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Twin Primes
EXAMPLE
383220 is the average of the four consecutive primes 383179, 383219, 383221, 383261.
1269642 is the average of the four consecutive primes 1269601, 1269641, 1269643, 1269683.
MATHEMATICA
Mean/@Select[Partition[Prime[Range[472000]], 4, 1], Differences[#] == {40, 2, 40}&] (* Harvey P. Dale, Oct 16 2021 *)
PROG
(Python)
from sympy import isprime, prevprime, nextprime
for i in range(0, 12000001, 6):
if isprime(i-1) and isprime(i+1) and prevprime(i-1) == i-41 and nextprime(i+1) == i+41: print (i, end=', ')
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Karl V. Keller, Jr., May 15 2016
STATUS
approved