Let denote the number of sequences of positive integers for which and each is a power of two . Let denote the number of sequences of positive integers for which and each inequality holds .
Prove that for every positive integer .
Let denote the number of sequences of positive integers for which and each is a power of two . Let denote the number of sequences of positive integers for which and each inequality holds .
Prove that for every positive integer .
We say that a sequence of positive integers has type if is a power of two for . We say that a sequence of positive integer has type if for .
Recall that the binary representation of a positive integer expresses it as a sum of distinct powers of two in a unique way. Furthermore, we have the following formula for every positive integer
Given a sequence of type , use the preceding formula to express each term as a sum of powers of two. Write these powers of two in left-aligned rows, in decreasing order of size. By construction, is the sum of the numbers in the th row. For example, we obtain the following array when we start with the type A sequence .
| 8 | 4 | 2 | 1 |
| :--- | :--- | :--- | :--- |
| 8 | 4 | 2 | 1 |
| 4 | 2 | 1 | |
| 2 | 1 | | |
| 2 | 1 | | |
| 2 | 1 | | |
| 1 | | | |
| 27 | 13 | 5 | 2 |
Define the sequence by setting to be the sum of the numbers in the th column of the array. For example, we obtain the sequence 27,13,5,2 from the array above. We now show that this new sequence has type B. This is clear from the fact that each column in the array contains at least as many entries as the column to the right of it and that each number larger than 1 in the array is twice the number to the right of it. Furthermore, it is clear that , since both are equal to the sum of all the entries in the array.
We now show that we can do this operation backwards. Suppose that we are given a type B sequence . We construct an array inductively as follows:
- We fill left-aligned rows with the numbers .
- Then we fill left aligned rows with the numbers .
- Then we fill left aligned rows with the numbers , and so on.
- In the last step we fill left-aligned rows with the number 1.
For example, if we start with the type B sequence , we obtain once again the array above. We define the sequence by setting to be the sum of the numbers in the th row of the array. By construction, this sequence has type A. Furthermore, it is clear that , since once again both sums are equal to the sum of all the entries in the array.
We have defined an operation that starts with a sequence of type A, produces an array whose row sums are given by the sequence, and outputs a sequence of type B corresponding to the column sums. We have also defined an operation that starts with a sequence of type , produces an array whose column sums are given by the sequence, and outputs a sequence of type A corresponding to the row sums. The arrays produced in both cases comprise leftaligned rows of the form , with non-increasing lengths. Let us refer to arrays obeying these properties as marvelous.
To show that these two operations are inverses of each other, it then suffices to prove that marvelous arrays are uniquely defined by either their row sums or their column sums. The former is obviously true and the latter arises from the observation that each step in the above inductive algorithm was forced in order to create a marvelous array with the prescribed column sums.
Thus, we have produced a bijection between the sequences of type A with sum and the sequences of type with sum . So we can conclude that for every positive integer .
Remark The solution above provides a bijection between type A and type B sequences via an algorithm. There are alternative ways to provide such a bijection. For example, given the numbers we may define the 's as
Conversely, given the numbers , one may define the 's by taking, as in the solution, numbers equal to numbers equal to , and numbers equal to . One now needs to verify that these maps are mutually inverse.