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.

A084383 a(0)=0; for n>0, a(n) = smallest number that is not a concatenation of any number of distinct earlier terms in increasing order.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 21, 22, 30, 31, 32, 33, 40, 41, 42, 43, 44, 50, 51, 52, 53, 54, 55, 60, 61, 62, 63, 64, 65, 66, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 112, 113, 114, 115, 116, 117, 118, 119, 200, 201, 202
Offset: 0

Views

Author

Amarnath Murthy, May 29 2003

Keywords

Comments

After 11 we can see 1,2 -> 12, 1,3 -> 13, etc., but not 20.

Crossrefs

Hannah Rollman's numbers: A048991, A048992.

Programs

  • Python
    from itertools import islice
    def incats(s, L):
        if s == "": return True
        return any(s.startswith(w) and incats(s[len(w):], L[i+1:]) for i, w in enumerate(L))
    def agen(): # generator of terms
        L, an, s = ["0"], 1, "1"
        yield from [0]
        while True:
            yield an
            L.append(s)
            while incats((s:=str(an)), L):
                an += 1
    print(list(islice(agen(), 70))) # Michael S. Branicky, Feb 01 2024

Extensions

More terms from Patrick De Geest, Jun 03 2003