A382465 Positive integers such that every even digit except the first is immediately preceded by a smaller digit.
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 23, 24, 25, 26, 27, 28, 29, 31, 33, 34, 35, 36, 37, 38, 39, 41, 43, 45, 46, 47, 48, 49, 51, 53, 55, 56, 57, 58, 59, 61, 63, 65, 67, 68, 69, 71, 73, 75, 77, 78, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99
Offset: 1
Links
- Paolo Xausa, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
A382465Q[k_] := FreeQ[Partition[IntegerDigits[k], 2, 1], {i_, j_?EvenQ} /; i >= j]; Select[Range[100], A382465Q]
-
Python
def ok(n): s = str(n) return n and all(d not in "02468" or s[i-1]
0) print([k for k in range(100) if ok(k)]) # Michael S. Branicky, Apr 30 2025
Comments