OFFSET
1,2
COMMENTS
This is the lexicographically earliest sequence of positive distinct terms with this property. A similar sequence could be computed with a(1) = 1 and a(2) = 12 but that sequence would not be the lexicographically earliest one showing the property. If we try the sequence starting with a(1) = 1 and a(2) = 10, we immediately see that no a(3) can extend the sequence (this is due to the digit "0" present in 10).
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
The values of a(n) * 11 begin:
1 * 11 = 11,
11 * 11 = 121,
2 * 11 = 22,
12 * 11 = 132,
21 * 11 = 231,
3 * 11 = 33,
22 * 11 = 242, etc.
We see that the succession of digits in the first column is the same as the succession of digits in the last column.
PROG
(Python)
from itertools import count, islice
def agen(): # generator of terms
aset, an, s = {"1", "11"}, 2, "21"
yield from [1, 11]
while True:
i = next(i for i in range(1, len(s)+1) if s[:i] not in aset and (i == len(s) or s[i] != "0"))
an = int(str(s[:i]))
s = s[i:] + str(an*11)
aset.add(str(an))
yield an
print(list(islice(agen(), 66))) # Michael S. Branicky, Apr 28 2023
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini, Apr 20 2023
EXTENSIONS
a(36) and beyond from Michael S. Branicky, Apr 28 2023
STATUS
approved