For a set of nonnegative integers, let denote the number of ordered pairs such that , , , and . Is it possible to partition the nonnegative integers into two sets and in such a way that for all ?
Solution
solution:} Yes, such a partition is possible. To achieve it, place each integer into if it has an even number of 1s in its binary representation, and into if it has an odd number. (One discovers this by simply attempting to place the first few numbers by hand and noticing the resulting pattern.) To show that , we exhibit a bijection between the pairs of distinct elements of with and the pairs of distinct elements of with . Namely, given a pair with , write both numbers in binary and find the lowest-order place in which they differ (such a place exists because ). Change both numbers in that place and call the resulting numbers . Then , but the parity of the number of 1s in is opposite that of , and likewise between and . This yields the desired bijection. solution:} (by Micah Smukler) Write for the number of 1s in the base 2 expansion of , and . Then the desired partition can be described as and . Since , we have If are both in , then ; if are both in , then ; if are in different sets, then . In other words, and it suffices to show that the sum on the right is always zero. If is odd, that sum is visibly . If is even, the sum equals This yields the desired result. solution:} (by Dan Bernstein) Put and ; then the value of (resp.\ ) is the coefficient of in (resp.\ ). From the evident identities we have We deduce that , yielding the desired equality. This partition is actually unique, up to interchanging and . More precisely, the condition that and for uniquely determines the positions of . We see this by induction on : given the result for , switching the location of changes by one and does not change , so it is not possible for both positions to work. Robin Chapman points out this problem is solved in D.J. Newman's Number Theory} (Springer, 1998); in that solution, one uses generating functions to find the partition and establish its uniqueness, not just verify it.