English
How to Solve IMO 1988 Problem 3: Binary Palindromes and Symmetry
The Answer and What Really Matters in This Binary Palindrome Math Problem
The answer is 92.
The right ideas were already appearing in the comments — and that’s genuinely inspiring.
In mathematics, what matters is often not just the answer itself, but the path to it: how to think, what to pay attention to, what structure to notice. The key is rarely the computation — it’s the idea. And once you have the idea, everything else looks almost obvious.
Two Key Ideas: Binary Representation and Symmetry
This problem has two such ideas — binary representation and symmetry.
Binary representation: the function behaves in a way that its values can be expressed through its values on smaller numbers — typically when dividing by 2 or 4. This hints that f “looks” at a number not in decimal, but in its binary form.
Symmetry: if you carefully trace the values of f(n), a pattern emerges: f(n) = n if and only if the binary representation of the number is symmetric — that is, n is a palindrome in binary. For example: the number 5 is 101 in binary — reversed, it’s still 101, so f(5) = 5. The number 6 is 110 — reversed, it’s 011, so f(6) ≠ 6.
Reducing to a Binary Palindrome Counting Problem
The problem reduces to the following: find all positive integers n ≤ 1988 whose binary representation is a palindrome. Those are exactly the numbers for which f(n) = n.
This is where the ideas end — what remains is pure counting. For numbers of length m bits, the count of binary palindromes is 2 raised to the power of ⌈(m−1)/2⌉. Counting by bit length:
- 1-bit numbers: 1 palindrome
- 2-bit numbers: 1 palindrome
- 3-bit numbers: 2 palindromes
- 4-bit numbers: 2 palindromes
- 5-bit numbers: 4 palindromes
- 6-bit numbers: 4 palindromes
- 7-bit numbers: 8 palindromes
- 8-bit numbers: 8 palindromes
- 9-bit numbers: 16 palindromes
- 10-bit numbers: 16 palindromes
Counting Binary Palindromes up to 1988
What remains is counting the symmetric numbers between 1024 and 1988.
The number 1988 in binary is 11111000100 — an 11-bit number. There are 30 symmetric numbers in this range.
Final Count and the Answer
Summing everything together:
1 + 1 + 2 + 2 + 4 + 4 + 8 + 8 + 16 + 16 + 30 = 92 numbers for which f(n) = n.
That’s the approach and the ideas behind it. Rigorous solutions can be found here.
No pages found.
