A098945 Numbers where 1 is the only odd decimal digit.
1, 10, 11, 12, 14, 16, 18, 21, 41, 61, 81, 100, 101, 102, 104, 106, 108, 110, 111, 112, 114, 116, 118, 120, 121, 122, 124, 126, 128, 140, 141, 142, 144, 146, 148, 160, 161, 162, 164, 166, 168, 180, 181, 182, 184, 186, 188, 201, 210, 211, 212, 214, 216, 218
Offset: 1
Links
Programs
-
Maple
A[1]:= {0,2,4,6,8}: B[1]:= {1}: for i from 2 to 3 do A[i]:= A[i-1] union map(t -> seq(x*10^(i-1)+t,x=[2,4,6,8]), A[i-1]); B[i]:= B[i-1] union map(t -> seq(x*10^(i-1)+t,x=[2,4,6,8]), B[i-1]) union map(t -> 10^(i-1)+t, A[i-1] union B[i-1]); od: sort(convert(B[3],list)); # Robert Israel, May 07 2020
-
Mathematica
Select[Range[250],Max[Select[IntegerDigits[#],OddQ]]==1&] (* Harvey P. Dale, Mar 13 2022 *)
-
Perl
for (0..1000) { print "$_, " if (/^[012468]*1[012468]*$/) } # Charles R Greathouse IV, Oct 05 2011
Comments