Find all functions $f : \mathbb{Z}\rightarrow \mathbb{Z}$ such that for all prime $p$ the following condition holds: $$p \mid ab + bc + ca \iff p \mid f(a)f(b) + f(b)f(c) + f(c)f(a)$$ Proposed by Anzo Teh Zhao Yang
Problem
Source: Malaysian IMO TST 2022 P5
Tags: number theory
14.05.2022 01:42
Prove $p\nmid f(n+1)-f(n) \rightarrow |f(n+1)-f(n)|=1$, and $f$ is injective, done.
14.05.2022 01:51
How do you prove that $p \nmid f(n + 1) - f(n)$?
14.05.2022 02:24
Really bashy solution because I couldn't find anything better: We claim that the only solutions are $f(n)\equiv n$ and $f(n)\equiv -n$. Indeed, both solutions work because $f(a)f(b)+f(b)f(c)+f(c)f(a)=ab+bc+ca$. We now show that they are the only solutions. Note that we have the condition $ab+bc+ca=0$ implies $f(a)f(b)+f(b)f(c)+f(c)f(a)=0$ $(\star)$. This is because any prime divides $0$, and the only number that is divisible by every prime is $0$. In particular, taking $a=b=c=0$ in $(\star)$ implies $3f(0)^2=0$ so $f(0)=0$. Now, taking $a=0$, $b=c$ in the original equation gives $p|b^2\iff p|f(b)^2$, so $p|b\iff p|f(b)$. (this implies injectivity at 0) In particular, $f(1)$ is $1$ or $-1$. Note that if $f$ is a solution, so is $-f$, so WLOG $f(1)=1$. If $f(-1)=1$, then taking $a=b=1,c=-1$ gives $p|-1\iff p|3$, which is false. Thus, $f(-1)=-1$. Taking $a=b=2n,c=-n$ in $(\star)$ gives $2f(-n)f(2n)+f(2n)^2=0$. For $n\ne 0$, we get $f(2n)=-2f(-n)$, which is obviously true for $n=0$ as well. Thus, this gives $f(4n)=-2f(-2n)=4f(n)$. Taking $a=4n, b=12n, c=-3n$ in $(\star)$ gives $f(4n)f(12n)+f(4n)f(-3n)+f(12n)f(-3n)=0$. Thus, $16f(n)f(3n)+4f(n)f(-3n)+4f(3n)f(-3n)=0$, or $4f(n)f(3n)+f(n)f(-3n)+f(3n)f(-3n)=0$. $(1)$ Taking $a=3n, b=6n, c=-2n$ in $(\star)$ gives $f(3n)f(6n)+f(3n)f(-2n)+f(-2n)f(6n)=0$. Thus, $-2f(3n)f(-3n)-2f(3n)f(n)+4f(n)f(-3n)=0$, or $2f(n)f(-3n)-f(-3n)f(3n)-f(3n)f(n)=0$. $(2)$. Adding $(1)$ and $(2)$ gives $3f(n)f(3n)+3f(n)f(-3n)=0$, so $f(3n)=f(-3n)$ for $n\ne 0$, obviously true for $n=0$ as well. From $(2)$, this gives $-3f(n)f(3n)+f(3n)^2$, so $f(3n)=3f(n)$ for $n\ne 0$, obviously true for $n=0$ as well. Thus, $6f(-n)=2f(-3n)=-f(6n)=f(-6n)=-2f(3n)=-6f(n)$. This means $f(-n)=-f(n)$. We now induct on $k$ to show that $f(kn)=kf(n)$ for all $n$, with base cases $k=1,2,3,4$ proven above. ($f(2n)=-2f(-n)=2f(n)$). Suppose it is true for $k-1$. Then, using $a=kn, b=k(k-1)n, c=-(k-1)n$ in $(\star)$, $f(kn)f(k(k-1)n)+f(kn)f(-(k-1)n)+f(k(k-1)n)f(-(k-1)n)=0$. From the induction hypothesis, $(k-1)f(kn)^2-(k-1)f(kn)f(n)-(k-1)^2f(kn)f(n)=0$. This simplifies to $f(kn)^2-kf(kn)f(n)=0$. Thus, $f(kn)=kf(n)$ for all $n\ne 0$, obviously true for $n=0$ as well. This completes the induction. Hence, $f(t)=tf(1)=t$ for all $t$. Removing the WLOG on $f(1)=1$, we get that the only solutions are $f(n)\equiv n$ and $f(n)\equiv -n$, as claimed.
14.05.2022 02:38
TYT wrote: How do you prove that $p \nmid f(n + 1) - f(n)$? Clearly f(even) is even and f(odd) is odd; for other (odd) primes, compare $P(a,b,n), P(a,b,n+1)$ where $p|ab+(a+b)n$ and $p\nmid a+b$ (or $p\nmid ab$) to see $p\nmid ab+(a+b)(n+1)$ but $p|f(a)f(b)+(f(a)+f(b))f(n)$ implies $p|f(a)f(b) + (f(a)+f(b))f(n+1)$ as $p\mid f(n+1)-f(n)$. Proving existence of such $a,b$ is not hard.
14.05.2022 03:51
If you spot some relation with IMO 2012 Problem 4, you're exactly right: this proposal was motivated by the IMO problem, though it wasn't even shown to many people until it was used as the Malaysian TST (yes, after 10 years).
14.05.2022 04:15
Let $P(a,b,c)$ denote the given assertion. If $f$ satisfies the condition, then $-f$ also satisfies the condition thus it suffices to consider the case which is $f(1)\geq 0$. $$P(0,0,0)\Rightarrow (p\ |\ 0 \Leftrightarrow p\ |\ 3f(0)^2)\Rightarrow 3f(0)^2=0\Rightarrow f(0)=0.$$$$P(1,1,0)\Rightarrow (p\ |\ 1 \Leftrightarrow p\ |\ f(1)^2)\Rightarrow f(1)^2=1\Rightarrow f(1)=1.$$ lemma. $f(\dfrac{q-1}{2})=\dfrac{q-1}{2}$ for every primes $q$ proof. $P(\dfrac{q-1}{2},1,0)$ gives $$p\ |\ \dfrac{q-1}{2}\Leftrightarrow p\ |\ f(\dfrac{q-1}{2})\cdots (\#)$$$$P(\dfrac{q-1}{2},1,1)\Rightarrow (p=q\Leftrightarrow p\ |\ q\Leftrightarrow p\ |\ 2f(\dfrac{q-1}{2})+1),$$means that there exists positive integer $s$ such that $|2f(\dfrac{q-1}{2})+1|=q^s$. Case1. $2f(\dfrac{q-1}{2})+1=-q^s$. Then $f(\dfrac{q-1}{2})=-\dfrac{q^s+1}{2}$. Notice that $\dfrac{q-1}{2}$ divides $\dfrac{q^s-1}{2}$, we get $$\gcd(\dfrac{q-1}{2},-\dfrac{q^s+1}{2})=\gcd(\dfrac{q-1}{2},-\dfrac{q^s+1}{2}+\dfrac{q^s-1}{2})=\gcd(\dfrac{q-1}{2},-1)=1$$but it contradicts with $(\#)$. Case2. $2f(\dfrac{q-1}{2})+1=q^s$. Then $f(\dfrac{q-1}{2})=\dfrac{q^s-1}{2}$. Suppose now that $s=2$. We get $p\ |\ \dfrac{q-1}{2}\Leftrightarrow p\ |\ \dfrac{q+1}{2}(q-1)$ but $$\gcd(\dfrac{q-1}{2},\dfrac{q+1}{2})=\gcd(\dfrac{q-1}{2},\dfrac{q+1}{2}-\dfrac{q-1}{2})=\gcd(\dfrac{q-1}{2},1)=1$$so it's a contradiction. If $s\geq 3,$ by Zsigmondy's theorem there exists prime divisor $p_1\neq 2$ of $\dfrac{q^s-1}{2}$ such that does not divide $\dfrac{q-1}{2}$ but it contradicts with $(\#)$. Hence $s=1$ and $f(\dfrac{q-1}{2})=\dfrac{q-1}{2}$, as desired. Let $q\geq 5$ be a prime. $$P(\dfrac{q-1}{2},1,a)\Rightarrow\left(p\ |\ \dfrac{q+1}{2}a+\dfrac{q-1}{2}\Leftrightarrow p\ |\ \dfrac{q+1}{2}f(a)+\dfrac{q-1}{2}\right).$$Notice that $\dfrac{q-1}{2}\perp \dfrac{q+1}{2}\Rightarrow \dfrac{q+1}{2}a+\dfrac{q-1}{2}\perp \dfrac{q+1}{2}$, we have $$p\ |\ \dfrac{q+1}{2}a+\dfrac{q-1}{2}\Rightarrow p\ |\ \dfrac{q+1}{2}f(a)+\dfrac{q-1}{2}-\{\dfrac{q+1}{2} a+\dfrac{q-1}{2}\}\Rightarrow p\ |\ \dfrac{q+1}{2}(f(a)-a)\Rightarrow p\ |\ f(a)-a.$$If $a=-1$, by replacing $q\rightarrow 5$ it holds that $$(p\ |-1\Leftrightarrow p\ |\ 3f(-1)+2)\Rightarrow |3f(-1)+2|=1$$so $f(-1)=-1$. If $|a|\geq 2$, by Dirichlet prime number theorem there exist primes $p'>\max\{|a+1|,|f(a)-a|\}$ and $q'$ that satisfying $$q'\equiv \dfrac{2}{a+1}-1\ (\bmod\ p')$$then $$p'\ |\ \dfrac{q'+1}{2}a+\dfrac{q'-1}{2}\Rightarrow p'\ |\ f(a)-a\Rightarrow f(a)-a=0$$so $f(a)=a$. From the above, we conclude $\forall a\in\mathbb{Z}, f(a)=a$ or $\forall a\in\mathbb{Z}, f(a)=-a$. This easily gives the result.
14.05.2022 15:05