login
A385466
Primes that are at the end of the local maxima in the sequence of consecutive prime gaps.
0
11, 17, 29, 37, 67, 79, 97, 107, 127, 137, 149, 191, 197, 239, 251, 277, 307, 331, 347, 367, 397, 419, 431, 439, 457, 479, 499, 521, 541, 557, 587, 631, 673, 701, 719, 751, 769, 787, 809, 821, 827, 853, 877, 907, 929, 967, 991, 1009, 1019, 1031, 1049, 1061, 1087
OFFSET
1,1
COMMENTS
This sequence lists the larger prime in each consecutive prime pair where the difference is a local maximum in the sequence of prime gaps.
A local maximum occurs when p(n)-p(n-1) < p(n+1)-p(n) > p(n+2)-p(n+1) where p(n) is the n-th prime.
FORMULA
a(n) = prime(A198696(n)+1). - Michel Marcus, Jul 01 2025
EXAMPLE
The primes 7 and 11 differ by 4, which is larger than the previous gap (2) and the next gap (2). So 11 is in the sequence.
MATHEMATICA
Module[{primes = Prime[Range[1, 200]], diffs, res = {}}, diffs = Differences[primes];
Do[If[diffs[[i]] > diffs[[i - 1]] && diffs[[i]] > diffs[[i + 1]],
AppendTo[res, primes[[i + 1]]]], {i, 2, Length[diffs] - 1}]; res]
PROG
(Python)
from sympy import primerange
primes = list(primerange(2, 2000))
diffs = [primes[i+1] - primes[i] for i in range(len(primes)-1)]
local_max_asals = []
for i in range(1, len(diffs)-1):
if diffs[i] > diffs[i-1] and diffs[i] > diffs[i+1]:
local_max_asals.append(primes[i+1])
print(local_max_asals[:70])
CROSSREFS
Cf. A001223 (prime gaps), A198696.
Sequence in context: A225493 A051634 A038918 * A220293 A166307 A128464
KEYWORD
nonn,easy
AUTHOR
Emirhan Üçok, Jun 29 2025
STATUS
approved