OFFSET
1,1
EXAMPLE
601687, 601697, 601717, and 601747 are four consecutive primes and the gaps between them are 10, 20, and 30.
MATHEMATICA
Prime[SequencePosition[Differences[Prime[Range[250000]]], {10, 20, 30}][[All, 1]]]
PROG
(Python)
from sympy import nextprime
from itertools import islice
def agen(): # generator of terms
p, q, r, s = 2, 3, 5, 7
while True:
if q-p == 10 and r-q == 20 and s-r == 30:
yield p
p, q, r, s = q, r, s, nextprime(s)
print(list(islice(agen(), 30))) # Michael S. Branicky, Feb 19 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Harvey P. Dale, Feb 19 2022
STATUS
approved