Problem

Source: IMO 1988/3, IMO Shortlist 26, United Kingdom 2, IMO Longlist 77

Tags: algebra, functional equation, binary representation, function, IMO, IMO 1988, david monk



A function $ f$ defined on the positive integers (and taking positive integers values) is given by: $ \begin{matrix} f(1) = 1, f(3) = 3 \\ f(2 \cdot n) = f(n) \\ f(4 \cdot n + 1) = 2 \cdot f(2 \cdot n + 1) - f(n) \\ f(4 \cdot n + 3) = 3 \cdot f(2 \cdot n + 1) - 2 \cdot f(n), \end{matrix}$ for all positive integers $ n.$ Determine with proof the number of positive integers $ \leq 1988$ for which $ f(n) = n.$