OFFSET
1,2
COMMENTS
This is a regular language in base 10. - Charles R Greathouse IV, Oct 05 2011
LINKS
MATHEMATICA
Select[Range[0, 1000], DigitCount[#, 10, 0]>0&&AllTrue[DeleteCases[IntegerDigits[ #], 0], OddQ]&] (* Harvey P. Dale, Mar 20 2023 *)
PROG
(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
CROSSREFS
Cf. A276137 (allowing no 0 digits).
KEYWORD
base,easy,nonn
AUTHOR
Eric Angelini, Oct 21 2004
EXTENSIONS
a(50)=790 inserted by Georg Fischer, Jun 26 2021
STATUS
approved