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