OFFSET
1,1
EXAMPLE
a(5) is 19 because when we look at the first 19 prime gaps, there is no sequence of 5 numbers that occurs twice. If we look at the first 20 prime gaps, there is a repetition.
PROG
(Python)
from sympy import primerange
list_of_prime_gaps = [x - y for x, y in zip(primerange(3, 40000),
primerange(1, 40000))]
def a(n):
saved = set()
for i in range(1, len(list_of_prime_gaps)-n):
sequence = list_of_prime_gaps[i:i+n]
if tuple(sequence) in saved:
return i + n - 1
saved.add(tuple(sequence))
return None
for n in range(1, 14):
print(a(n), end=", ")
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Armin Schäfer, May 31 2021
EXTENSIONS
a(14) from Armin Schäfer, Aug 08 2021
STATUS
approved