A347298 Numbers that contain an even digit d immediately followed by a digit <= d.
20, 21, 22, 40, 41, 42, 43, 44, 60, 61, 62, 63, 64, 65, 66, 80, 81, 82, 83, 84, 85, 86, 87, 88, 100, 120, 121, 122, 140, 141, 142, 143, 144, 160, 161, 162, 163, 164, 165, 166, 180, 181, 182, 183, 184, 185, 186, 187, 188, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215
Offset: 1
Links
- Paolo Xausa, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
A347298Q[k_] := MemberQ[Partition[IntegerDigits[k], 2, 1], {i_?EvenQ, j_} /; j <= i]; Select[Range[300], A347298Q] (* Paolo Xausa, Mar 17 2025 *)
-
Python
def ok(n): s = str(n) return any(s[i] in "2468" and s[i+1] <= s[i] for i in range(len(s)-1)) print([k for k in range(216) if ok(k)]) # Michael S. Branicky, Nov 28 2024
Comments