The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A225985 List the positive numbers, remove even digits (including zeros) from each term; sequence = remaining terms. 3

%I #26 Aug 06 2022 08:23:12

%S 1,3,5,7,9,1,11,1,13,1,15,1,17,1,19,1,3,5,7,9,3,31,3,33,3,35,3,37,3,

%T 39,1,3,5,7,9,5,51,5,53,5,55,5,57,5,59,1,3,5,7,9,7,71,7,73,7,75,7,77,

%U 7,79,1,3,5,7,9,9,91,9,93,9,95,9,97,9,99,1,11,1,13

%N List the positive numbers, remove even digits (including zeros) from each term; sequence = remaining terms.

%H Paul Tek, <a href="/A225985/b225985.txt">Table of n, a(n) for n = 1..10000</a>

%F a(A226091(n)) = A014261(n). - _Reinhard Zumkeller_, May 26 2013

%e The natural numbers with at least one odd digit in their decimal representation are: 1, 3, 5, 7, 9, 10, 11, 12, 13, ...

%e By excluding their even digits, we obtain: 1, 3, 5, 7, 9, 1, 11, 1, 13, ...

%e 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]

%t FromDigits[DeleteCases[IntegerDigits[#],_?EvenQ]]&/@Range[200]/. (0-> Nothing) (* _Harvey P. Dale_, Apr 04 2017 *)

%o (Haskell)

%o a225985 n = a225985_list !! (n-1)

%o a225985_list = map read $ filter (not . null) $

%o map (filter (`elem` "13579") . show) [0..] :: [Integer]

%o -- _Reinhard Zumkeller_, May 26 2013

%o (Python)

%o from itertools import count, islice

%o def agen(): # generator of terms

%o for n in count(1):

%o removed = "".join(d if d in "13579" else "" for d in str(n))

%o if removed != "": yield int(removed)

%o print(list(islice(agen(), 80))) # _Michael S. Branicky_, Aug 05 2022

%Y Cf. A038573.

%Y Cf. A014261 (duplicates removed), A226091.

%K nonn,base,look

%O 1,2

%A _Dave Durgin_, May 22 2013

%E Definition clarified by _N. J. A. Sloane_, Aug 06 2022 at the suggestion of _Michel Marcus_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 8 03:40 EDT 2024. Contains 373207 sequences. (Running on oeis4.)