cp's OEIS Frontend

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.

A348178 The list of all prime numbers is split into sublists with the 1st sublist L_1 = {2} and n-th sublist L_n = {p_1, p_2, ..., p_m}. a(n) is the largest m such that the maximum prime gap in L_n is < p_1 - prevprime(p_1).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 2, 4, 1, 2, 3, 2, 1, 6, 32, 4, 33, 55, 35, 28, 842, 124, 349, 131, 168, 394, 585, 575, 10972, 14683, 1762, 743, 9388, 62587, 551, 14434, 31184, 176163, 407736, 249427, 111406, 225524, 1530229, 4107702, 3581556, 116030, 10028870, 2065372
Offset: 1

Views

Author

Ya-Ping Lu, Oct 05 2021

Keywords

Comments

The last prime in the n-th sublist is A134266(n). The gap between the n-th and (n+1)-th sublists is A085237(n).

Crossrefs

Programs

  • Python
    from sympy import nextprime
    L = [2]
    for n in range(1, 50):
        print(len(L), end = ', ')
        p0 = L[-1]; p1 = nextprime(p0); g0 = p1 - p0; M = [p1]; p = nextprime(p1)
        while p - p1 < g0: M.append(p); p1 = p; p = nextprime(p)
        L = M