Find all functions $f:\mathbb{Z}^{+} \rightarrow \mathbb{Z}^{+}$ such that the conditions $\quad a) \quad a-b \mid f(a)-f(b)$ for all $a\neq b$ and $a,b \in \mathbb{Z}^{+}$ $\quad b) \quad f(\varphi(a))=\varphi(f(a))$ for all $a \in \mathbb{Z}^{+}$ where $\varphi$ is the Euler's totient function. holds
Problem
Source: 2024 Turkey EGMO TST P2
Tags: number theory, function, Divisibility, functional equation
12.02.2024 12:40
The answers are $f(x) \equiv 1$ and $f(x) \equiv x$. The condition implies that $f(1) = f(\varphi(1)) = \varphi (f(1))$ and hence $f(1)=1$. Then $\varphi (f(2)) = f( \varphi (2)) = f(1)= 1$. Hence, $f(2) \leq 2$. Case 1: $f(2)=1$. We prove by strong induction that $f(k)=1$ for all $k \in \mathbb{Z}^+$. Note that $\varphi(k) < k$ and hence by induction $f(\varphi(k))=1=\varphi(f(k))$ which implies that $f(k) \leq 2$. Suppose that $f(k)=2$. Then the condition implies that $k-(k-2)= 2 \mid f(k)-f(k-2) = 1$, a contradiction. $\square$ Case 2: $f(2)=2$. Again, we prove by strong induction that $f(k)=k$ for all $k \in \mathbb{Z}^+$. Assume the contrary. We have $k - a \mid f(k) - a \implies k - a \mid f(k) - k$ for all $a < k$. Suppose that $k \in \mathbb{P}$. Then it follows from $k-1 \mid f(k)-1$ that $2 \nmid f(k)$. Hence, letting $f(k)=p_1^{\alpha_1}p_2^{\alpha_2} \dots p_n^{\alpha_n}$, we have $\varphi(f(k)) = (p_1-1)p_1^{\alpha_1-1} \cdot \dots \cdot (p_n-1)p_n^{\alpha_n-1} \geq \sqrt{2f(k)}$ whenever $f(k)>3$. Recall that $k-1 \mid f(k)-k$ and $k-2 \mid f(k)-k$ which implies that $(k-1)(k-2) \mid f(k)-k \implies \frac{k^2}{2} < k^2-2k+2 \leq f(k)$. Hence, $\varphi(f(k)) \geq \sqrt{2f(k)} > k$, a contradiction. Now, suppose that $k \notin \mathbb{P}$. Since every positive integer smaller than $k$ divides $f(k)-k$, we must have $k \mid f(k)$. It follows that $\varphi(f(k)) > \varphi(k)$ unless $f(k)=k$ so we're done. $\blacksquare$
12.02.2024 20:04
$a-b|f(a)-f(b)$ $f(\phi(a))=\phi(f(a))$ Let $P(a,b)$ be the assertion on $a-b|f(a)-f(b)$ Let $Q(a)$ be the assertion on $f(\phi(a))=\phi(f(a))$ $Q(1)\implies f(1)=f((\phi(1)))=\phi(f(1))\implies \boxed{f(1)=1}$ $P(a,1)\implies a-1|f(a)-1$ $Q(2)\implies 1=f(\phi(2))=\phi(f(2))\implies f(2)\in \{1,2\}$ $i)$ If $f(2)=1$ Let $f(2^k)=1$ for $k=1,2,...,n$ We'll prove that $f(2^{n+1})=1$ by induction. $Q(2^{n+1})\implies 1=f(2^{n})=f(\phi(2^{n+1}))=\phi(f(2^{n+1}))$ So $f(2^{n+1})\in \{1,2\}$ $P(2^{n+1},2^n)\implies 2^n|f(2^{n+1})-1$ We know that $n\geq 1$ so $f(2^{n+1})\neq 2$ which means that $f(2^{n+1})=1$ $P(2^n,b)\implies 2^n-b|1-f(b)$ We can take $n$ to positive infinity so $f(b)=1$ In this case, we have the solution $\boxed{f\equiv 1}$ $ii)$ If $f(2)=2$ $Q(3)\implies 2=\phi(f(3))\implies f(3)\in \{3,4,6\}$ $P(3,1)\implies 2|f(3)-1\implies \boxed{f(3)=3}$ We'll prove that $f(n)=n$ by induction. Let $f(k)=k$ for $k=1,2,...,n-1$ Let $k=p_1^{\alpha_1}...p_m^{\alpha_m}$ $\rule{430pt}{1pt}$ Claim: $k|f(k)$ if $k\neq p^{\alpha}$ Proof: By induction, we have $k-m|f(k)-m+m-k=f(k)-k$ so $k-m|f(k)-k$ for all $m\in[1,k-1].$ $p_1^{\alpha_1},...,p_m^{\alpha_m}<k$ so $p_i^{\alpha_i}|p_1^{\alpha_1}...p_m^{\alpha_m}-p_i^{\alpha_i}|f(k)-p_1^{\alpha_1}...p_m^{\alpha_m}\implies p_i^{\alpha_i}|f(k)\implies k|f(k)$ $\rule{430pt}{1pt}$ $Q(k)\implies \phi(k)=f(\phi(k))=\phi(f(k))$ $p_1^{\alpha_1-1}...p_m^{\alpha_m-1}(p_1-1)...(p_m-1)= \phi(k)=\phi(f(k))=\phi(p_1^{\alpha_1}...p_m^{\alpha_m}T)$ We can see that if $T\geq 2$, then $RHS>LHS$. If $k$ has at least two distinct prime divisors, then $f(k)=k$ by induction. If $k=p^{\alpha}$, then $p^{\alpha-1}(p-1)=\phi(f(p^{\alpha}))$ $P(p^{\alpha},p^{\alpha-1})\implies p^{\alpha-1}|f(p^{\alpha})$ $P(p^{\alpha},p^{\alpha}-q)\implies q=p^{\alpha}-(p^{\alpha}-q)|f(p^{\alpha})-p^{\alpha}$ which gives that $f(p^{\alpha})$ has no prime divisor other than $p$. $f(p^{\alpha})$ is a power of $p$ so $f(p^{\alpha})=p^{\alpha}$ By induction, we get that $\boxed{f(n)=n}$
22.02.2024 13:18
It is obvious that the functions $f(x) \equiv 1$ and $f(x) = x$ satisfy the given equation. Now, we will prove that these are the only solutions. Let $P(a, b)$ denote the assertion $a-b \mid f(a) - f(b)$ and $Q(a)$ denote the assertion $f(\varphi(a)) = \varphi(f(a))$. \begin{align*} Q(1)&: f(1) = \varphi(f(1)) \implies f(1) = 1 \\ Q(2)&: \varphi(f(2)) = f(1) = 1 \implies f(2) = 1 \text{ or } 2. \end{align*}Consider the case when $f(2) = 1$. Suppose $f(1) = f(2) = \cdots = f(k) = 1$ for some $k \geq 2$. Then, \begin{align*} Q(k+1): \varphi(f(k+1)) = f(\varphi(k+1)) =1 \implies f(k+1) = 1 \text{ or } 2. \end{align*}But if $f(k+1) = 2$, then $P(k+1, 1)$ gives $k\mid 1$ which contradicts $k \geq 2$. Thus, $f(k+1) = 1$. By mathematical induction, $f(n) = 1$ for all $n$ in this case. Now, suppose $f(2) = 2$. Assume $f(a) = a$ for all $1\leq a < k$ for some $k \geq 3$. For such $a$, \[k - a \mid f(k) - a \implies k-a \mid f(k) - k.\]Thus, $a \mid f(k) - k$ for all $1\leq a < k$. Observe that if $\gcd(a, k) = 1$, then $\gcd(a, f(k)) = 1$. Moreover, $\gcd(f(k), f(k) - 1) = 1$. This shows that $\varphi(f(k)) \geq \varphi(k) + 1$ if $f(k) > k$. On the other hand, $Q(k)$ yields $\varphi(f(k)) = f(\varphi(k)) = \varphi(k)$. Thus, we must have $f(k) \leq k$. If $f(k) = 1$, then $k-2 \mid k-1$. This is possible only when $k=3$. However, this would imply that \[Q(3): 1 =\varphi(f(3)) = f(\varphi(3)) = 2\]which is absurd. Thus, \[P(k, 1): k-1 \mid f(k) - 1 \implies f(k) \geq k.\]Hence, we must have $f(k) = k$, and the inductive proof is complete.