

A370517


a(n) is the largest prime p such that all prime numbers q <= p have distinct length n prime gap sequences.


0



3, 7, 7, 7, 47, 251, 421, 421, 9769, 9769, 36469, 36469, 36469, 184224493, 2159263321, 13848073963, 33980350373
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

Given p(i) the ith prime number, the gap sequence of length n for prime p(i) is defined as: p(i+1)p(i), p(i+2)p(i+1), ..., p(i+n)p(i+n1). E.g., the length 3 gap sequence of 7 is [117, 1311, 1713] is [4, 2, 4].


LINKS



EXAMPLE

For n = 5, the largest prime with a distinct gap sequence is 47. For all primes up to and including 47, the length 5 gap sequences are distinct, while the next prime, 53, has a gap sequence equal to 23, namely [6, 2, 6, 4, 2].


PROG

(Python)
s = set()
for p, g in ((w[0][0], tuple(r  q for q, r in w[1:])) for w in sliding_window(pairwise(primes()), n + 1)):
if g in s: return p
else: s.add(g)


CROSSREFS



KEYWORD

nonn,more


AUTHOR



STATUS

approved



