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.

A378904 2*a(n) are the gaps that correspond to A350100(n).

Original entry on oeis.org

1, 2, 3, 7, 9, 10, 12, 13, 15, 17, 18, 20, 26, 27, 29, 33, 39, 41, 66, 75, 84, 90, 95, 100, 113, 126, 140, 144, 155, 162, 177, 204, 206, 210, 216, 302, 303, 364, 389, 391, 399, 418, 441, 469, 492, 497, 504, 520, 613, 723
Offset: 1

Views

Author

Hugo Pfoertner, Dec 15 2024

Keywords

Crossrefs

Programs

  • PARI
    a378904(kmax) = my(d=0); for(k=2, kmax, my(k2=k*k, dd=(nextprime(k2)-precprime(k2))/2); if(dd>d, print1(dd,", "); d=dd));
    a378904(10^6)
    
  • Python
    from itertools import count, islice
    from sympy import prevprime, nextprime
    def A378904_gen(): # generator of terms
        c = 0
        for k in count(2):
            a = nextprime(m:=k**2)-prevprime(m)
            if a>c:
                yield a>>1
                c = a
    A378904_list = list(islice(A378904_gen(),20)) # Chai Wah Wu, Dec 17 2024

Extensions

a(50) from Hugo Pfoertner, Jan 04 2025