A382624 Positive integers such that every even digit except the leftmost is immediately preceded by a larger digit.
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 20, 21, 23, 25, 27, 29, 30, 31, 32, 33, 35, 37, 39, 40, 41, 42, 43, 45, 47, 49, 50, 51, 52, 53, 54, 55, 57, 59, 60, 61, 62, 63, 64, 65, 67, 69, 70, 71, 72, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83, 84, 85, 86, 87, 89, 90
Offset: 1
Links
- Paolo Xausa, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
A382624Q[k_] := FreeQ[Partition[IntegerDigits[k], 2, 1], {i_, j_?EvenQ} /; i <= j]; Select[Range[100], A382624Q]
-
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 "02468") print([k for k in range(1, 91) if ok(k)]) # Michael S. Branicky, Apr 03 2025
Comments