Let be the number of 1s in the binary expression of , i.e., the binary digit count of 1, giving 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, ... (OEIS A000120) for , 2, .... Then the number of odd binomial coefficients where is (Glaisher 1899, Fine 1947). This means that the number of odd elements in the first rows of Pascal's triangle is
(1)
|
the first few terms of which are 1, 3, 5, 9, 11, 15, 19, 27, 29, 33, ... (OEIS A006046).
The terms of this sequence are given by the recurrence
(2)
|
with and . The special case of a power of 2 gives
(3)
|
Taking a cue from equation (3), the function can be well approximated by , where
(4)
|
(OEIS A020857). In addition, oscillates between a minimum near 0.81... and a maximum at 1 in a fractal-like manner, as illustrated above. Stolarsky (1977) and Harborth (1977) studied the asymptotic behavior of . Define
(5)
| |||
(6)
|
where lim inf is the infimum limit and lim sup is the supremum limit. Stolarsky (1977) showed that
(7)
|
and conjectured that
(8)
| |||
(9)
|
(Harborth 1977, Stolarsky 1977). Harborth (1977) subsequently proved that , but that the correct value for , called the Stolarsky-Harborth constant by Finch, is equal to . A more exact value is
(10)
|
(OEIS A077464).
The value of this constant can be computed by examining the sequence
(11)
|
where is defined by and the recurrence
(12)
|
with the sign chosen to minimize . The resulting points are local minima, illustrated above. The first few values of are (1, 1), (3, 5), (5, 11), (11, 37), (21, 103), (43, 317), (87, 967), (173, 2869), ... (OEIS A077465 and A077466; Harborth 1977). The number of 1s in the binary representation of the minimal are then 1, 2, 2, 3, 3, 4, 5, 5, 6, 6, 7, ... (OEIS A077467). Harborth (1977) computed to six digits using rigorous inequalities on , but opined "at the end, we remark that from [] will probably be the exact value of ."
Note that Harborth's recurrence does not necessarily give the cumulative minima, since it will miss a local minimum at if the value of the function is less when evaluated at than at . The sequence giving all local minima is therefore 1, 3, 5, 11, 21, 43, 87, 171, 173, 347, 693, 1387, 2775, 5547, 5549, ... (OEIS A084230), where the "missing" terms 171, 5547, ... have been added back in.