A383249 Positive integers ending with the digit 1, or containing an odd digit d immediately followed by a digit >= d.
1, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 31, 33, 34, 35, 36, 37, 38, 39, 41, 51, 55, 56, 57, 58, 59, 61, 71, 77, 78, 79, 81, 91, 99, 101, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135
Offset: 1
Links
- Paolo Xausa, Table of n, a(n) for n = 1..10000
- Quinn Savitt, Proof that A383249 is the complement of A342045
Crossrefs
Programs
-
Mathematica
A383249Q[k_] := Last[#] == 1 || MemberQ[Partition[#, 2, 1], {i_?OddQ, j_} /; j >= i] & [IntegerDigits[k]]; Select[Range[200], A383249Q]
-
Python
def ok(n): if n%10 == 1: return True s = str(n) return any(d in "13579" and s[i]>=d for i, d in enumerate(s, 1) if i < len(s)) print([k for k in range(136) if ok(k)]) # Michael S. Branicky, Apr 28 2025
Comments