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.

A366093 Indices of records in A366092.

Original entry on oeis.org

0, 11, 22, 27, 58, 61, 110, 126, 161, 545, 566, 592, 747, 775, 2286, 5343, 5360, 5741, 18245, 78272, 93999, 140690, 146338, 227734, 251721, 274297, 372294, 447238, 586777, 808500, 7185887, 10479806, 37485090, 85742340, 91332097, 111764212, 117522098, 556747657, 589122990
Offset: 1

Views

Author

Paolo Xausa, Sep 29 2023

Keywords

Crossrefs

Cf. A366092.

Programs

  • Mathematica
    pDist[n_]:=If[PrimeQ[n],0,Min[NextPrime[n]-n,n-NextPrime[n,-1]]];
    A366093list[upto_]:=Module[{r=-1,a={},d=Map[pDist,Prepend[Accumulate[Prime[Range[upto]]],0]]},Do[If[d[[i]]>r,r=d[[i]];AppendTo[a,i-1]],{i,upto}];a];
    A366093list[10000]
  • Python
    from itertools import count, islice
    from sympy import prevprime, nextprime
    def A366093_gen(): # generator of terms
        c, s, p = 2, 0, 1
        yield 0
        for i in count(1):
            if (m:=min((s:=s+(p:=nextprime(p)))-prevprime(s+1),nextprime(s)-s))>c:
                yield i
                c = m
    A366093_list = list(islice(A366093_gen(),20)) # Chai Wah Wu, Oct 03 2023

Extensions

a(31)-a(39) from Michael S. Branicky, Oct 03 2023