login
Numbers that contain an odd digit.
4

%I #27 Aug 03 2024 16:58:34

%S 1,3,5,7,9,10,11,12,13,14,15,16,17,18,19,21,23,25,27,29,30,31,32,33,

%T 34,35,36,37,38,39,41,43,45,47,49,50,51,52,53,54,55,56,57,58,59,61,63,

%U 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

%N Numbers that contain an odd digit.

%C Complement of A014263; A196564(a(n)) > 0; A103181(a(n)) > 0. - _Reinhard Zumkeller_, Oct 04 2011

%H Reinhard Zumkeller, <a href="/A007957/b007957.txt">Table of n, a(n) for n = 1..10000</a>

%H F. Smarandache, <a href="http://www.gallup.unm.edu/~smarandache/OPNS.pdf">Only Problems, Not Solutions!</a>, Xiquan Publ., Phoenix-Chicago, 1993.

%H <a href="/index/Ar#10-automatic">Index entries for 10-automatic sequences</a>.

%F a(n) = n + O(n^0.69897...) where the constant is A153268. - _Charles R Greathouse IV_, Jul 25 2012

%t Select[Range[100],Count[IntegerDigits[#],_?OddQ]>0&] (* _Harvey P. Dale_, Sep 06 2017 *)

%o (Haskell)

%o import Data.List (findIndices)

%o a007957 n = a007957_list !! (n-1)

%o a007957_list = findIndices (> 0) a196564_list

%o a196564 n = length [d | d <- show n, d `elem` "13579"]

%o a196564_list = map a196564 [0..]

%o -- _Reinhard Zumkeller_, Oct 04 2011

%o (PARI) is(n)=my(v=vecsort(eval(Vec(Str(n)))%2,,8));v[#v] \\ _Charles R Greathouse IV_, Jul 25 2012

%Y Cf. A014263, A103181, A196564.

%K nonn,base,easy

%O 1,2

%A R. Muller