OFFSET
1,3
COMMENTS
Could be summarized as "odd digit, previous smaller". A variant of A342042.
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..10000
Paolo Xausa, Color scatterplot of the first 100000 terms
MATHEMATICA
A383059list[nmax_] := Module[{a, s, invQ, fu = 1},
invQ[k_] := invQ[k] = (If[#, s[k] = #]; #) & [MemberQ[Partition[IntegerDigits[k], 2, 1], {i_, j_?OddQ} /; i >= j]];
s[_] := False; s[0] = True;
NestList[(a = fu; While[s[a] || invQ[a] || invQ[# + First[IntegerDigits[a]]], a++] & [Mod[#, 10]*10]; While[s[fu], fu++]; s[a] = True; a) &, 0, nmax - 1]];
A383059list[100]
PROG
(Python)
from itertools import count, islice
def cond(s):
return all(s[i] > s[i-1] for i in range(1, len(s)) if s[i] in "13579")
def agen(): # generator of terms
an, seen, s, m = 0, {0}, "0", 1
while True:
yield an
an = next(k for k in count(m) if k not in seen and cond(s[-1]+str(k)))
seen.add(an); s += str(an)
while m in seen or not cond(str(m)): m += 1
print(list(islice(agen(), 70))) # Michael S. Branicky, Apr 19 2025
CROSSREFS
KEYWORD
AUTHOR
Paolo Xausa, Apr 18 2025
STATUS
approved
