login
A367358
Indices k at which either the leading digit or the length of A121805(k) changes.
1
1, 2, 3, 4, 5, 7, 8, 11, 13, 17, 19, 21, 22, 24, 45, 69, 90, 107, 127, 145, 164, 185, 204, 422, 614, 822, 1007, 1174, 1392, 1585, 1757, 1943, 4115, 6039, 8123, 9974, 11641, 13814, 15738, 17822, 19673, 41413, 60643, 81477, 99995, 114281, 132138, 151369, 172201, 190720, 408111, 646206, 854539, 1039724, 1373058, 1551630, 1743937, 1952271
OFFSET
1,2
PROG
(Python)
def agen(): # generator of terms
n, an, y, prev_lead, prev_length = 1, 1, 1, None, None
while y < 10:
san = str(an)
lead, length = san[0], len(san)
if lead != prev_lead or length != prev_length:
yield n
an, y = an + 10*(an%10), 1
while y < 10:
if str(an+y)[0] == str(y):
an += y
break
y += 1
n, prev_lead, prev_length = n+1, lead, length
print(list(agen())) # Michael S. Branicky, Nov 22 2023
CROSSREFS
KEYWORD
nonn,base,fini,full
AUTHOR
N. J. A. Sloane, Nov 21 2023
EXTENSIONS
More terms from Michael S. Branicky, Nov 22 2023
STATUS
approved