The problem states:
$\text{ 3. A function f is defined on the positive integers}$$ $$\text{ (and taking positive integer values) is given by }$ $$f(1) = 1, f(3) = 3,$$ $$f(2n) = f(n),$$ $$f(4n + 1) = 2f(2n + 1) - f(n),$$ $$f(4n + 3) = 3f(2n +1) - 2f(n)$$ $\text{for all positive integers n. Determine with proof the}$ $\text{ number of positive integers less than or equal to}$ $\text{ 1988 for which } f(n) = n$
First I have tried to proof $n$ should be even. Then I assumed $f(n) = n$ for all odd positive integers and but such assumption failed because $f(4n + 1) ≠ 4n + 1$. So the remaining set of numbers are odd numbers with difference of four, i.e $f(4n+3)$ pass the test $f(n)= n$. And I got the answer to be quarter of all numbers below 1988 plus $f(1)$. So $498$ is my answer. Can anyone comment on this solution ? Or if I am mistaken, suggest a correction ?This is my first IMO practice question.
Your answer to this problem is not correct (the correct one is $92$); see this video https://youtu.be/eXdUB1wY6d4 where the author uses the fact that the function $f$ reverses the binary rappresentation of $n$.