This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A362017 #9 Jul 08 2025 07:48:45 %S A362017 2,3,5,7,11,17,23,29,37,53,59,67,79,89,97,127,137,149,157,163,173,179, %T A362017 191,197,211,223,239,251,293,307,331,347,353,359,367,397,409,419,431, %U A362017 439,449,457,479,521,541,557,587,631,673,683,691,701,719,787,809,821 %N A362017 a(n) is the leading prime in the n-th prime sublist defined in A348168. %C A362017 If Conjecture 2 in A348168 is true, lim_{n->infinity} a(n)/prime(round((n-1)*e)+1) = 1, where e is Euler's number. %C A362017 If a term p (>2) is from a single-prime sublist (A356271), then p is a weak prime (A051635) or a balanced prime (A006562). Otherwise, p is a strong prime (A051634). %C A362017 The definition divides the primes into maximal sublists such that gaps between adjacent primes in a sublist are smaller than the gap that precedes the sublist and no larger than the first gap within the sublist. - _Peter Munn_, Jul 07 2025 %e A362017 According to the definition in A348168, prime numbers are divided into sublists, L_1, L_2, L_3,..., in which L_n = [p(n,1), p(n,2), ..., p(n,m(n))], where p(n,k) is the k-th prime and m(n) the number of primes in the n-th sublist L_n. Thus, a(n) = p(n,1). The first sublist L_1 = [2]. If p(n,1) <= (prevprime(p(n,1)) + nextprime(p(n,1)))/2, then L_n has only 1 prime, p(n,1). Otherwise, m(n) is the largest integer such that g(n,1) >= g(n,i), where g(n,i) = p(n,i+1) - p(n,i) and 2 <= i <= m(n). %e A362017 The first 32 primes, for example, are divided into 16 prime sublists: %e A362017 [2], %e A362017 [3], %e A362017 [5], %e A362017 [7], %e A362017 [11,13], %e A362017 [17,19], %e A362017 [23], %e A362017 [29,31], %e A362017 [37,41,43,47], %e A362017 [53], %e A362017 [59,61], %e A362017 [67,71,73], %e A362017 [79,83], %e A362017 [89], %e A362017 [97,101,103,107,109,113], %e A362017 [127,131]. %e A362017 The leading primes in these sublists are: 2, 3, 5, 7, 11, 17, 23, 29, 37, 53, 59, 67, 79, 89, 97, 127. Therefore, a(1) = 2, a(2) = 3, ..., and a(16) = 127. %o A362017 (Python) %o A362017 from sympy import nextprime; R = [2]; L = [2] %o A362017 for n in range(2, 57): %o A362017 p0 = L[-1]; p1 = nextprime(p0); M = [p1]; g0 = p1-p0; p = nextprime(p1); g1 = p-p1 %o A362017 while g1 < g0 and p-p1 <= g1: M.append(p); p1 = p; p = nextprime(p) %o A362017 L = M; R.append(L[0]) %o A362017 print(*R, sep =', ') %Y A362017 Cf. A006562, A051634, A051635, A348168, A356271. %K A362017 nonn %O A362017 1,1 %A A362017 _Ya-Ping Lu_, Apr 04 2023