OFFSET
1,2
LINKS
Paul Tek, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
The natural numbers with at least one odd digit in their decimal representation are: 1, 3, 5, 7, 9, 10, 11, 12, 13, ...
By excluding their even digits, we obtain: 1, 3, 5, 7, 9, 1, 11, 1, 13, ...
Hence: a(1)=1, a(2)=3, a(3)=5, a(4)=7, a(5)=9, a(6)=1, a(7)=11, a(8)=1, a(9)=13, .... [Example corrected by Paul Tek, May 24 2013]
MATHEMATICA
FromDigits[DeleteCases[IntegerDigits[#], _?EvenQ]]&/@Range[200]/. (0-> Nothing) (* Harvey P. Dale, Apr 04 2017 *)
PROG
(Haskell)
a225985 n = a225985_list !! (n-1)
a225985_list = map read $ filter (not . null) $
map (filter (`elem` "13579") . show) [0..] :: [Integer]
-- Reinhard Zumkeller, May 26 2013
(Python)
from itertools import count, islice
def agen(): # generator of terms
for n in count(1):
removed = "".join(d if d in "13579" else "" for d in str(n))
if removed != "": yield int(removed)
print(list(islice(agen(), 80))) # Michael S. Branicky, Aug 05 2022
CROSSREFS
KEYWORD
AUTHOR
Dave Durgin, May 22 2013
EXTENSIONS
Definition clarified by N. J. A. Sloane, Aug 06 2022 at the suggestion of Michel Marcus
STATUS
approved