MathLabs

Problem 3

Let A(n)A(n) denote the number of sequences a1≥a2≥⋯≥aka_1\ge a_2\ge\cdots\ge a_k of positive integers for which a1+⋯+ak=na_1+\cdots+a_k=n and each ai+1a_i+1 is a power of two (i=1,2,…,ki=1,2,\ldots,k). Let B(n)B(n) denote the number of sequences b1≥b2≥⋯≥bmb_1\ge b_2\ge\cdots\ge b_m of positive integers for which b1+⋯+bm=nb_1+\cdots+b_m=n and each inequality bj≥2bj+1b_j\ge2b_{j+1} holds (j=1,2,…,m−1j=1,2,\ldots,m-1). Prove that A(n)=B(n)A(n)=B(n) for every positive integer nn.
Step 1 of 4: Expand a type-AA sequence into a left-aligned array
ai=2Ni−1+2Ni−2+⋯+21+20a_i=2^{N_i-1}+2^{N_i-2}+\cdots+2^1+2^0
Detailed analysis

Call a sequence of type AA if each term satisfies ai+1=2Nia_i+1=2^{N_i} for some positive integer NiN_i, and of type BB if bj≥2bj+1b_j\ge2b_{j+1} for consecutive terms. Given a type-AA sequence a1≥⋯≥aka_1\ge\cdots\ge a_k, expand each ai=2Ni−1+⋯+21+20a_i=2^{N_i-1}+\cdots+2^1+2^0 using the identity 2N−1=2N−1+⋯+2+12^{N}-1=2^{N-1}+\cdots+2+1, and write these powers of two as a left-aligned array with row ii holding the expansion of aia_i; the rows have non-increasing length since a1≥⋯≥aka_1\ge\cdots\ge a_k.