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.

A066512 Least nonnegative integer not the sum or product of any previous pair. a(1)=0.

Original entry on oeis.org

0, 0, 1, 2, 4, 7, 10, 13, 16, 19, 22, 25, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 62, 65, 68, 71, 74, 77, 80, 83, 86, 89, 94, 97, 103, 106, 109, 115, 118, 121, 126, 129, 135, 138, 141, 147, 150, 153, 158, 161, 164, 167, 170, 173, 176, 179, 182, 185, 193, 196, 199
Offset: 1

Views

Author

Brian Galebach, Jan 04 2002

Keywords

Examples

			a(13)=30, which is not a(i)+a(j) or a(i)*a(j) for any distinct i,j < 13.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        a, sums, products = [0], set(), set()
        yield from a
        for k in count(0):
            if k not in sums and k not in products:
                yield k
                sums.update(k+a[i] for i in range(len(a)))
                products.update(k*a[i] for i in range(len(a)))
                a.append(k)
            sums.discard(k)
            products.discard(k)
    print(list(islice(agen(), 61))) # Michael S. Branicky, Jun 09 2025