Maths WorkshopMaths problems with full solutions
Exercise 1759Logic, sets and proofs › Proof techniques › InductionOlympiadAdded 3 Nov 2026

Representation of integers

#strong induction#representation#powers

Statement

Show that every positive integer can be written as a sum of distinct powers of 22 (binary expansion).

Hint

Strong induction: if nn is even, divide by 22; if odd, subtract 11.

Show solutionHide solution

Solution

Strong induction. Base case n=1n=1: 1=201=2^0. ✓

Inductive step. Suppose every integer <n<n has a binary expansion.
- If nn is even: n=2mn=2m with m<nm<n, so m=∑2aim=\sum 2^{a_i}; then n=∑2ai+1n=\sum 2^{a_i+1}, distinct powers.
- If nn is odd: n−1n-1 is even and <n<n, so n−1=∑2bin-1=\sum 2^{b_i}; then n=20+∑2bin=2^0+\sum 2^{b_i}, with 00 distinct from all bib_i (since n−1n-1 even means all bi≥1b_i\ge1).

Conclusion. Every positive integer is a sum of distinct powers of 22.