A381242 Lexicographically earliest sequence of distinct terms > 1 such that no term is a substring of the product of any two terms.
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
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
Cf. A382453
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
Comments