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.

A376201 Fixed points in A376198.

Original entry on oeis.org

1, 2, 3, 4, 11, 12, 27, 28, 59, 60, 123, 124, 125, 126, 255, 256, 515, 516, 517, 518, 519, 520, 1043, 1044, 1045, 1046, 1047, 1048, 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110, 4223, 4224, 4225, 4226, 4227, 4228, 8459, 8460, 16923, 16924, 16925, 16926, 33855, 33856, 67715, 67716, 67717, 67718, 67719
Offset: 1

Views

Author

N. J. A. Sloane, Oct 03 2024

Keywords

Comments

Conjectures: the terms consist of runs of an even number (>1) of successive numbers that increase by 1 at each step; A376758(n) is one-half of the length of the n-th such run; and the run ends at A376751(n) - 1. - N. J. A. Sloane, Oct 07 2024

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from sympy import isprime, nextprime
    def agen(): # generator of terms
        an, smc, smp = 2, 4, 3
        yield from [1, 2]
        for n in count(3):
            if not isprime(an):
                an = smp if an == 2*smp else smc
            else:
                an = smp if smp < smc else smc
            if an == smp: smp = nextprime(smp)
            else:
                smc += 1
                while isprime(smc): smc += 1
            if n == an: yield an
    print(list(islice(agen(), 59))) # Michael S. Branicky, Oct 03 2024