A383062 Nonnegative integers such that every odd digit except the leftmost is immediately preceded by a smaller digit.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 34, 35, 36, 37, 38, 39, 40, 42, 44, 45, 46, 47, 48, 49, 50, 52, 54, 56, 57, 58, 59, 60, 62, 64, 66, 67, 68, 69, 70, 72, 74, 76, 78, 79, 80, 82, 84, 86, 88, 89, 90
Offset: 1
Links
- Paolo Xausa, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
A383062Q[k_] := FreeQ[Partition[IntegerDigits[k], 2, 1], {i_, j_?OddQ} /; i >= j]; Select[Range[0, 100], A383062Q]
-
Python
def ok(n): s = str(n) return all(s[i+1] > s[i] for i in range(len(s)-1) if s[i+1] in "13579") print([k for k in range(91) if ok(k)]) # Michael S. Branicky, Apr 19 2025
Comments