This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A382462 #25 May 13 2025 11:34:11 %S A382462 1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,31,21,23,33,34,35,36,37, %T A382462 38,39,51,24,53,41,25,55,56,57,58,59,71,26,73,43,45,61,27,75,63,46,77, %U A382462 78,79,91,28,93,47,81,29,95,65,67,83,48,97,85,68,99,111,49,112,69 %N A382462 Lexicographically earliest sequence of distinct positive integers such that if a digit d in the digit stream (ignoring commas) is even, the previous digit is < d. %C A382462 Could be summarized as "even digit, previous smaller". A variant of A342042. %C A382462 No term contains the digit 0. - _Paolo Xausa_, Apr 30 2025 %H A382462 Paolo Xausa, <a href="/A382462/b382462.txt">Table of n, a(n) for n = 1..10000</a> %t A382462 A382462list[nmax_] := Module[{a, s, invQ, fu = 2}, %t A382462 invQ[k_] := invQ[k] = (If[#, s[k] = #]; #) & [MemberQ[Partition[IntegerDigits[k], 2, 1], {i_, j_?EvenQ} /; i >= j]]; %t A382462 s[_] := False; s[1] = True; %t A382462 NestList[(a = fu; While[s[a] || invQ[a] || invQ[# + First[IntegerDigits[a]]], a++] & [Mod[#, 10]*10]; While[s[fu], fu++]; s[a] = True; a) &, 1, nmax-1]]; %t A382462 A382462list[100] %o A382462 (Python) %o A382462 from itertools import count, islice %o A382462 def cond(s): %o A382462 return all(s[i] > s[i-1] for i in range(1, len(s)) if s[i] in "02468") %o A382462 def agen(): # generator of terms %o A382462 an, seen, s, m = 1, {1}, "1", 1 %o A382462 while True: %o A382462 yield an %o A382462 an = next(k for k in count(m) if k not in seen and cond(s[-1]+str(k))) %o A382462 seen.add(an); s += str(an) %o A382462 while m in seen or not cond(str(m)): m += 1 %o A382462 print(list(islice(agen(), 70))) # _Michael S. Branicky_, Apr 19 2025 %Y A382462 Similar sequences: A342042, A342043, A342044, A342045, A382621, A382935, A383059. %Y A382462 Cf. A382463, A382464, A382465, A382466. %K A382462 nonn,base,look %O A382462 1,2 %A A382462 _Paolo Xausa_, Mar 27 2025