Let $f: \mathbb Z^+ \to \mathbb Z$ be a function such that a) $f(p)=1$ for every prime $p$. b) $f(xy)=xf(y)+yf(x)$ for every pair of positive integers $x,y$ Find the least number $n \ge 2021$ such that $f(n)=n$
Problem
Source: Bolivia Ibero TST 2021 Day 1 P2
Tags: function, number theory, Bolivia, TST, functional equation
02.09.2022 23:27
CMIMC 2017 N7
02.09.2022 23:36
Let $g(n)=\frac{f(n)}n$. Then, $f(n)=n$ if and only if $g(n)=1$. Since $\frac{f(xy)}{xy}=\frac{f(x)}x+\frac{f(y)}y$, we have $g(xy)=g(x)+g(y)$, so if $n=p_1p_2\ldots p_k$ where $p_i$ are primes, then $g(n)=g(p_1)+\ldots+g(p_k)=\frac1{p_1}+\ldots+\frac1{p_k}$. Suppose that not all of the $p_i$ are equal. Then, $p_1$ can only appear in the prime factorization less than $p_1$ times, so if it appears $a$ times, then $\nu_{p_1}\left(\frac a{p_1}\right)=-1$, so since $\nu_{p_1}\left(\frac1{p_i}\right)=0$ for $p_i\neq p_1$, this means that $\nu_{p_1}(g(n))=-1$, which is a contradiction. Therefore, $p_1$ appears $p_1$ times in the prime factorization of $n$, so no other prime can appear. Therefore, $f(n)=n$ if and only if $n=p^p$ for some prime $p$. The smallest such number at least $2021$ is $5^5=\boxed{3125}$.
03.09.2022 01:21
A faster proof is, upon letting $g(n)=f(n)/n$ to get \[ g(N) = \sum_{1\le i\le k}\frac{\alpha_i}{p_i},\quad\text{where}\quad N = \prod_{1\le i\le k}p_i^{\alpha_i} \]for primes $p_1<\cdots<p_k$. Now, $f(n)=n\iff g(n)=1$. Let $n$ be as above. Multiplying both sides by $P/p_i$ where $\textstyle P=\prod_{1\le i\le k}p_i$, we get $p_i\mid \alpha_i$. Hence $g(N)\ge k$. From here, $f(n)=n\iff n=p^p$ for some prime $p$. From here, we immediately conclude $5^5$ to be the smallest such number.