454 ARITHMETIC 4.6.3 where d, is (X web hosting) the number
454 ARITHMETIC 4.6.3 where d, is the number of doublings among steps 1, 2, . . . , i. We also define a sequence of multisets So, &, . . . , S,, which keep track of the powers of 2 present in the chain. (A multiset is a mathematical entity that is like a set, but it is allowed to contain repeated elements; an object may be an element of a multiset several times, and its multiplicity of occurrences is relevant. See exercise 19 for familiar examples of multisets.) The multisets S, are defined by the rules a) SO = (0); b) If ai+l = 2az, then &+i = 5 i + 1 = {z + 1 1 z E Si }; C) If ai+l = oi + ok, /C < i, then Si+r = S, &J Sk. (The symbol H means that the multisets are combined, adding the multi- plicities.) From this definition it follows that Ui = c 2=, (36) XES, where the terms in this sum are not necessarily distinct. In particular, n = y0 + y + . . . + 2Q = c 2x. (37) XES, The number of elements in the latter sum is at most 2f, where f = r -d is the number of nondoublings. Since n has two different binary representations in (37), we can partition the multiset S,. into multisets MO, Ml, . . . , Mt such that 2Q = c 2=, o