OFFSET
1,2
COMMENTS
a(1) = 0 is included as well.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
PROG
(Python)
from itertools import count, islice
def cond(s): return all(s[i+1] > s[i] for i in range(len(s)-1) if s[i] in "02468")
def A342042gen(): # generator of A342042
seen, an = set(), 0
while True:
yield an
seen.add(an)
d = an%10
an = minfirst = (1 - d%2)*(d+1)
stran = str(an)
while an in seen or not cond(stran):
an += 1
stran = str(an)
if int(stran[0]) < minfirst:
an = minfirst*10**(len(stran)-1)
def A3799034gen(): # generator of minima, indices
g = A342042gen()
p = float('inf'); m = next(g); n = next(g)
for k in count(1):
if p > m < n: yield (m, k)
p, m, n = m, n, next(g)
print([t[0] for t in islice(A3799034gen(), 56)]) # Michael S. Branicky, Jan 08 2025
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo Xausa, Jan 05 2025
STATUS
approved