MathLabs

Problem 4

Prove that for every positive integer tt there is a unique permutation a0,a1,…,at−1a_0,a_1,\ldots,a_{t-1} of 0,1,…,t−10,1,\ldots,t-1 such that, for every 0≤i≤t−10\le i\le t-1, the binomial coefficient (t+i2ai)\binom{t+i}{2a_i} is odd and 2ai≠t+i2a_i\neq t+i.
Step 2 of 6: A bit-count identity
∑i=0t−1∣S(t+i)∣=t+∑i=0t−1∣S(2i)∣\sum_{i=0}^{t-1}|S(t+i)|=t+\sum_{i=0}^{t-1}|S(2i)|
Detailed analysis

Since S(2i)={1+x:x∈S(i)}S(2i)=\{1+x:x\in S(i)\} and S(2i+1)={0}∪{1+x:x∈S(i)}S(2i+1)=\{0\}\cup\{1+x:x\in S(i)\} (appending a binary digit), a short induction on tt shows ∑i=0t−1∣S(t+i)∣=t+∑i=0t−1∣S(2i)∣\sum_{i=0}^{t-1}|S(t+i)|=t+\sum_{i=0}^{t-1}|S(2i)|: each step splits the sum over tt consecutive integers into a sum over tt smaller integers plus one extra set bit per pair (2i,2i+1)(2i,2i+1).