This site is supported by donations to The OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A152723 In binary, count of least frequent bit of n. 2

%I

%S 0,1,0,1,1,1,0,1,2,2,1,2,1,1,0,1,2,2,2,2,2,2,1,2,2,2,1,2,1,1,0,1,2,2,

%T 3,2,3,3,2,2,3,3,2,3,2,2,1,2,3,3,2,3,2,2,1,3,2,2,1,2,1,1,0,1

%N In binary, count of least frequent bit of n.

%C Express n in binary, then a(n) is the smaller of the number of 0s and the number of 1s;

%C a(n) = min( A000120(n), A023416(n));

%C a(n) + A152724(n) = 1+floor(log(n)).

%C a(n) = A070939(n) - A152724(n). - _Reinhard Zumkeller_, Mar 31 2015

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

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%e n = 35 is the smallest number for which a(n) = 3, since 35 in binary is 100011, which is the smallest binary number with 3 0s and 3 1s.~

%t Table[Min[DigitCount[n,2,1],DigitCount[n,2,0]],{n,70}] (* _Harvey P. Dale_, May 09 2012 *)

%o a152723 n = min (a000120 n) (a023416 n)

%o -- _Reinhard Zumkeller_, Mar 31 2015

%Y Cf. A000120, A023416, A070939, A152724.

%K base,easy,nonn

%O 1,9

%A _Frank Ruskey_, Dec 11 2008

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

Last modified October 20 22:44 EDT 2019. Contains 328291 sequences. (Running on oeis4.)