A382937 Positive integers that contain an odd digit d immediately preceded by a digit <= d.
11, 13, 15, 17, 19, 23, 25, 27, 29, 33, 35, 37, 39, 45, 47, 49, 55, 57, 59, 67, 69, 77, 79, 89, 99, 101, 103, 105, 107, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 123, 125, 127, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 145, 147, 149, 150
Offset: 1
Links
- Paolo Xausa, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
A382937Q[k_] := MemberQ[Partition[IntegerDigits[k], 2, 1], {i_, j_?OddQ} /; i <= j]; Select[Range[200], A382937Q]
-
Python
def ok(n): s = str(n) return any(s[i+1] >= s[i] for i in range(len(s)-1) if s[i+1] in "13579") print([k for k in range(1, 151) if ok(k)]) # Michael S. Branicky, Apr 14 2025