A096844 Numbers where 0 is the only even decimal digit.
0, 10, 30, 50, 70, 90, 100, 101, 103, 105, 107, 109, 110, 130, 150, 170, 190, 300, 301, 303, 305, 307, 309, 310, 330, 350, 370, 390, 500, 501, 503, 505, 507, 509, 510, 530, 550, 570, 590, 700, 701, 703, 705, 707, 709, 710, 730, 750, 770, 790, 900, 901, 903, 905
Offset: 1
Links
Crossrefs
Programs
-
Mathematica
Select[Range[0,1000],DigitCount[#,10,0]>0&&AllTrue[DeleteCases[IntegerDigits[ #],0],OddQ]&] (* Harvey P. Dale, Mar 20 2023 *)
-
Perl
for (0..1000) { print "$_, " if (/^[013579]*0[013579]*$/) } # Charles R Greathouse IV, Oct 05 2011
-
Python
from itertools import product def agen(maxdigits): yield 0 for digs in range(2, maxdigits+1): for p in product("013579", repeat=digs): if p[0] != '0' and '0' in p: yield int("".join(p)) print([an for an in agen(3)]) # Michael S. Branicky, Jun 26 2021
Extensions
a(50)=790 inserted by Georg Fischer, Jun 26 2021
Comments