Problem

Source: ELMO Shortlist 2012, N2

Tags: function, number theory, relatively prime, number theory proposed



For positive rational $x$, if $x$ is written in the form $p/q$ with $p, q$ positive relatively prime integers, define $f(x)=p+q$. For example, $f(1)=2$. a) Prove that if $f(x)=f(mx/n)$ for rational $x$ and positive integers $m, n$, then $f(x)$ divides $|m-n|$. b) Let $n$ be a positive integer. If all $x$ which satisfy $f(x)=f(2^nx)$ also satisfy $f(x)=2^n-1$, find all possible values of $n$. Anderson Wang.