A007957 Numbers that contain an odd digit.
1, 3, 5, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 23, 25, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 43, 45, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 63, 65, 67, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, 83, 85, 87, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- F. Smarandache, Only Problems, Not Solutions!, Xiquan Publ., Phoenix-Chicago, 1993.
- Index entries for 10-automatic sequences.
Programs
-
Haskell
import Data.List (findIndices) a007957 n = a007957_list !! (n-1) a007957_list = findIndices (> 0) a196564_list a196564 n = length [d | d <- show n, d `elem` "13579"] a196564_list = map a196564 [0..] -- Reinhard Zumkeller, Oct 04 2011
-
Mathematica
Select[Range[100],Count[IntegerDigits[#],?OddQ]>0&] (* _Harvey P. Dale, Sep 06 2017 *)
-
PARI
is(n)=my(v=vecsort(eval(Vec(Str(n)))%2,,8));v[#v] \\ Charles R Greathouse IV, Jul 25 2012
Formula
a(n) = n + O(n^0.69897...) where the constant is A153268. - Charles R Greathouse IV, Jul 25 2012
Comments