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.

A374349 Integers >=0 whose decimal digits are topologically distinct from those of any smaller number.

Original entry on oeis.org

0, 1, 8, 10, 11, 18, 40, 48, 88, 100, 101, 108, 111, 118, 188, 400, 408, 488, 888, 1000, 1001, 1008, 1011, 1018, 1088, 1111, 1118, 1188, 1888, 4000, 4008, 4088, 4888, 8888, 10000, 10001, 10008, 10011, 10018, 10088, 10111, 10118, 10188, 10888, 11111, 11118
Offset: 1

Views

Author

Charles L. Hohn, Jul 05 2024

Keywords

Comments

Assumes 0 without a slash or a center dot, closed 4, 6, and 9, and no overlapping of multiple digits. Digits homologous to a (flattened) sphere: 1, 2, 3, 5, 7; to a torus: 0, 4, 6, 9; to a double torus: 8. Sequence is a run of the terms in ascending numeric order.
All topologically distinct terms can be represented by nondecreasing sequences of strings of 0s, 1s, and 8s. However, terms cannot begin with 0. Therefore, if a string has 0s, then (i) if there are any 1s, one of them moves to the front, (ii) else, the first 0 is replaced with 4. Sequence is the resulting strings sorted as base-10 numbers. - Michael S. Branicky, Jul 11 2024

Examples

			0 is homologous to 1 torus, so a(1)=0.
1 is homologous to 1 sphere, so a(2)=1.
2 is homologous to 1 sphere, same as 1, so it is not in the sequence.
4 is homologous to 1 torus, same as 0, so it is not in the sequence.
8 is homologous to 1 double torus, so a(3)=8.
10 is homologous to 1 sphere and 1 torus, so a(4)=10.
11 is homologous to 2 spheres, so a(5)=11.
14 is homologous to 1 sphere and 1 torus, same as 10, so it is not in the sequence.
41 is homologous to 1 sphere and 1 torus, same as 10, so it is not in the sequence.
		

Crossrefs

Programs

  • PARI
    df(d, c)=(10^c-1)/9*d
    n=0; a=0; at=1; while(true, a++; at+=a+1; ac=0; for(b=0, a, for(c=0, b, n++; print(n, " ", if(n<=2, n-1, ac+b-c+1
    				
  • Python
    from itertools import count, islice, combinations_with_replacement as cwr
    def agen(): # generator of terms
        after = {"1":"018", "4":"08", "8":"8"}
        yield from (0, 1, 8)
        for digits in count(2):
            for first in "148":
                for rest in cwr(after[first], digits-1):
                    yield int(first + "".join(rest))
    print(list(islice(agen(), 50))) # Michael S. Branicky, Jul 07 2024