OFFSET
1,2
COMMENTS
A self-describing sequence.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..1001
EXAMPLE
a(1)*a(2) = 1*10 = 10 and 1 is the 1st digit of the product and S;
a(2)*a(3) = 10*11 = 110 and 1, 1 are the first 2 digits of the product and S;
a(3)*a(4) = 11*100 = 1100 and 1, 1, 0 are the first 3 digits of the product and S;
a(4)*a(5) = 100*1101 = 110100 and 1, 1, 0, 1 are the first 4 digits of the product and S;
a(5)*a(6) = 1101*10001 = 11011101 and 1, 1, 0, 1, 1 are the first 5 digits of the product and S;
a(6)*a(7) = 10001*11010 = 110111010 and 1, 1, 0, 1, 1, 1 are the first 6 digits of the product and S; etc.
PROG
(Python)
def aupton(terms):
alst, astr, n = [1], "1", 1
while len(alst) < terms:
an, n = alst[-1], len(alst)
target, pow10 = int(astr[:n]), 1
while len(alst) == n:
i = 0
while i < pow10:
q, r = divmod(target+i, an)
if r == 0 and q not in alst:
alst.append(q)
astr += str(q)
break
i += an - r
pow10 *= 10
target *= 10
return alst
print(aupton(21)) # Michael S. Branicky, Jan 07 2022
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Sep 30 2021
EXTENSIONS
a(15) and beyond from Michael S. Branicky, Jan 07 2022
STATUS
approved