Find all functions $f : Z_{>0} \to Z_{>0}$ with $a - f(b) | af(a) - bf(b)$ for all $a, b \in Z_{>0}$. (Theresia Eisenkoelbl)
Problem
Source: 2022 Austrian Federal Competition For Advanced Students, Part 2 p1
Tags: function, number theory, divides
05.10.2022 16:58
I claim $f(n)=n$ for all $n$. Denote by $P(a,b)$ the given assertion. Note that $P(1,a)$ implies $f(a)-1\mid af(a)-f(1)$. As $f(a)-1\mid af(a)-a$, we get $f(a)-1\mid a-f(1)$. Moreover, $P(a,1)$ implies $a-f(1)\mid af(a)-f(1)$. As $a-f(1)\mid af(a)-f(a)f(1)$, we get $a-f(1)\mid f(1)(f(a)-1)$. Now, we take $a=p+f(1)$, where $p>f(1)$ is an arbitrary prime. With this, $(a-f(1),f(1))=1$, hence $a-f(1)\mid f(a)-1$. Hence for any such $a$, we get $f(a)-1=a-f(1)$, that is $f(a)=a-f(1)+1$. Now, we fix any arbitrary $b$, consider any $a$ of the above form (namely, $a=f(1)+p$ where $p>f(1)$ is a prime) and inspect $P(a,b)$. This gives us $a-f(b)\mid af(a)-bf(b) = a(a-f(1)+1) - bf(b)$. As $a\equiv f(b)\pmod{a-f(b)}$, we further conclude that \[ a(a-f(1)+1)-bf(b)\equiv f(b)(f(b)-f(1)+1) - bf(b) = f(b)(f(b)-f(1)+1-b)\pmod{a-f(b)}. \]Hence, \[ a-f(b)\mid f(b)(f(b)-f(1)+1-b). \]Taking $p$ sufficiently large, it must therefore be the case that \[ f(b)\bigl(f(b)-f(1)+1-b\bigr)=0\implies f(b) = b+f(1)-1\quad \forall b\ge 1. \]Taking $b$ of form $p+f(1)$, we also have $f(b)=b-f(1)+1$. This yields $f(1)=1$, which, in turn, yields $f(b)=b$ for all $b$, as claimed. Edit. I had an error before, thx below for alert.
01.11.2024 20:24
Set $a=f(b)$: \[ 0 \, \vert \, f(b)f(f(b)) - b(f(b)) \implies f(b)(f(f(b))- b) = 0 \implies f(f(b)) = b \]Set $b = f(b)$: \[ a-b \, \vert \, af(a) - bf(b) \implies a-b \, \vert \, af(a) - bf(b) - (a-b)f(a) = af(a) - bf(b) -af(a) + bf(a) = b(f(b) - f(a)) \]Set $b=1$ : \[ a-1 \, \vert \, f(a) - f(1) < f(a) \implies a \leq f(a)\]Set $a = f(a)$ : \[ f(a) - 1 \, \vert \, a - f(1) < a \implies f(a) \leq a\]Thus we must have $f(n) \equiv n$.