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.

A381242 Lexicographically earliest sequence of distinct terms > 1 such that no term is a substring of the product of any two terms.

Original entry on oeis.org

2, 3, 20, 22, 28, 30, 200, 202, 220, 248, 280, 300, 2000, 2002, 2020, 2022, 2200, 2480, 2800, 3000, 3252, 3272, 20000, 20002, 20020, 20022, 20200, 20220, 22000, 23252, 24800, 28000, 30000, 32520, 32720, 200000, 200002, 200020, 200022, 200200, 200202, 200220
Offset: 1

Views

Author

Dominic McCarty, Mar 24 2025

Keywords

Comments

The "two terms" mentioned in the name are not necessarily distinct, so no term is the substring of the square of any term.
It can be shown that the digits 1 and 6 never appear, and that all terms start with either a 2 or a 3.
If k is in the sequence, then so is 10*k.
Conjecture: The digit 9 never appears.

Examples

			For calculating a(3):
If 4 was in the sequence, 3*4 = 12 would have 2 as a substring, so it is disallowed.
If 5 was in the sequence, 3*5 = 15 would have 5, itself, as a substring, so it is disallowed.
The first term that is allowed is 20, since 20 is the first term not to have 2, 3, or itself as a substring of any of the following: 2*20 = 40, 3*20 = 60, 20*20 = 400.
So, a(3) = 20.
		

Crossrefs

Programs

  • Python
    a = [2]
    while len(a) < 20:
        a.append(a[-1]+1)
        while any(any(str(k) in str(a[i]*a[j]) for k in a) for i in range(len(a)) for j in range(i,len(a))): a[-1] += 1
    print(a)
    
  • Python
    from itertools import count, islice
    def agen():    # generator of terms
        slst, alst, an = [], [], 2
        S = {"4"}  # strings of products of two terms (including self products)
        while True:
            alst.append(an)
            slst.append(str(an))
            yield an
            for k in count(an+1):
                sk = str(k)
                if any(sk in s for s in S): continue
                Pk = [str(ai*k) for ai in alst] + [str(k*k)]
                if any(si in s for s in Pk for si in slst+[sk]): continue
                an = k
                S |= set(Pk)
                break
    print(list(islice(agen(), 42))) # Michael S. Branicky, Mar 26 2025