A309539 Positive numbers that contain both odd and even digits, with no digit repeated.
10, 12, 14, 16, 18, 21, 23, 25, 27, 29, 30, 32, 34, 36, 38, 41, 43, 45, 47, 49, 50, 52, 54, 56, 58, 61, 63, 65, 67, 69, 70, 72, 74, 76, 78, 81, 83, 85, 87, 89, 90, 92, 94, 96, 98, 102, 103, 104, 105, 106, 107, 108, 109, 120, 123, 124, 125, 126, 127, 128, 129, 130, 132, 134, 136
Offset: 1
Examples
49 and 50 are in the sequence but 19 and 20 are not.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
filter:= proc(n) local L; L:= convert(n,base,10); nops(L) = nops(convert(L,set)) and convert(L mod 2,set) = {0,1}; end proc: select(filter, [$10 .. 1000]); # Robert Israel, Jan 09 2025
-
Mathematica
boeQ[n_]:=Max[DigitCount[n]]==1&&IntegerLength[n]>Count[ IntegerDigits[ n],?EvenQ]>0; Select[Range[150],boeQ] (* _Harvey P. Dale, Jul 02 2020 *)
-
PARI
isok(n) = my(d=digits(n)); (#d == #Set(d)) && #select(x->(x%2), d) && #select(x->!(x%2), d); \\ Michel Marcus, Aug 07 2019
Comments