login
A382465
Positive integers such that every even digit except the first is immediately preceded by a smaller digit.
10
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,2
COMMENTS
Conjecture: these are the terms of A382462, sorted.
MATHEMATICA
A382465Q[k_] := FreeQ[Partition[IntegerDigits[k], 2, 1], {i_, j_?EvenQ} /; i >= j];
Select[Range[100], A382465Q]
PROG
(Python)
def ok(n):
s = str(n)
return n and all(d not in "02468" or s[i-1]<d for i, d in enumerate(s) if i > 0)
print([k for k in range(100) if ok(k)]) # Michael S. Branicky, Apr 30 2025
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paolo Xausa, Mar 28 2025
STATUS
approved