OFFSET
1,1
LINKS
Paul Tek, Table of n, a(n) for n = 1..10000
PROG
(Python)
import heapq
from itertools import islice
def agen():
c = 12
h = [(c, 1, 2)]
nextcount = 3
while True:
(v, s, l) = heapq.heappop(h)
yield v
if v >= c:
c = int(str(c) + str(nextcount))
heapq.heappush(h, (c, 1, nextcount))
nextcount += 1
l += 1; v = int(str(v)[len(str(s)):] + str(l)); s += 1
heapq.heappush(h, (v, s, l))
print(list(islice(agen(), 47))) # Michael S. Branicky, Dec 23 2021
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
EXTENSIONS
Edited by Charles R Greathouse IV, Apr 28 2010
Corrected by Paul Tek, Jun 08 2013
STATUS
approved