A098949 Numbers where 9 is the only odd decimal digit.
9, 29, 49, 69, 89, 90, 92, 94, 96, 98, 99, 209, 229, 249, 269, 289, 290, 292, 294, 296, 298, 299, 409, 429, 449, 469, 489, 490, 492, 494, 496, 498, 499, 609, 629, 649, 669, 689, 690, 692, 694, 696, 698, 699, 809, 829, 849, 869, 889, 890, 892, 894, 896, 898
Offset: 1
Links
Programs
-
Mathematica
Select[Range[1000], DigitCount[ # ][[1]] == 0 && DigitCount[ # ][[3]] == 0 && DigitCount[ # ][[5]] == 0 && DigitCount[ # ][[7]] == 0 && DigitCount[ # ][[9]] >0 &] (* Stefan Steinerberger, Jun 06 2006; corrected by Harvey P. Dale, May 07 2019 *) Select[Range[1000],Union[Select[IntegerDigits[#],OddQ]]=={9}&] (* Harvey P. Dale, May 07 2019 *)
-
Perl
for (0..1000) { print "$_, " if (/^[024689]*9[024689]*$/) } # Charles R Greathouse IV, Oct 05 2011
-
Python
def ok(n): return set(str(n)) & set("13579") == set("9") print(list(filter(ok, range(899)))) # Michael S. Branicky, Sep 29 2021
Extensions
More terms from Stefan Steinerberger, Jun 06 2006
Comments