Let $\mathbb{N}=\{1, 2, 3, \dots\}$ be the set of all positive integers. Find all functions $f : \mathbb{N} \rightarrow \mathbb{N}$ such that for any positive integers $a$ and $b$, the following two conditions hold: (1) $f(ab) = f(a)f(b)$, and (2) at least two of the numbers $f(a)$, $f(b)$, and $f(a+b)$ are equal.
Problem
Source: EGMO 2022/2
Tags: EGMO, number theory, functional equation, EGMO2022
10.04.2022 01:21
Yay, one more problem proposed by Ukraine at international contest. Finally, non-geometry one. The author is my friend Fedir Yudin, and I am sure that this is far not the last problem by him at such olympiads as IMO, EGMO and RMM. Here is my solution: Clearly, $f(1) = 1$. Assume, $m$ is the smallest for which $f(m)>1$. Due to multiplicativity, $m$ is prime, so let $m = p$ and $f(p)=t > 1$, then $f(p^\alpha) = t^\alpha$. Consider the smallest $n$ relatively prime to $p$ s. t. $f(n)>1$. Due to multiplicativity, again $n$ is prime, let $n = q$. Assume, that $p^\alpha < q < p^{\alpha+1}$. Now consider second condition for $f(p^\alpha), f(q - p^\alpha), f(q)$. Since $q - p^\alpha < q$ and $q - p^\alpha$ is relatively prime to $p$ then $f(q - p^\alpha) = 1$, clearly $f(p^\alpha) = t^\alpha$, so, since $f(q)>1$ we must have $f(q) = t^\alpha$. But then let $r$ be the remainder of $p^{\alpha+1}$ upon division by $q$, and $p^{\alpha+1} = qk + r$. Then consider second condition for $f(qk), f(r), f(p^{\alpha+1})$: $f(qk) = f(q)f(k)$, since $q > p^\alpha$ we have $k < p$, so $f(k) = 1$, thus $f(qk) = f(q) = t^\alpha$. Since $r < q$ and $r$ is relatively prime to $p$ (else we'll have $qk$ is divisible by $p$, but $k < p$ and $q$ is prime different from $p$), we claim that $f(r) = 1$. However then $f(p^{\alpha+1})=t^{\alpha+1}$ and $f(qk) = t^\alpha , f(r) = 1, f(p^{\alpha+1})=t^{\alpha+1}$, for $t>1$ these are three pairwise different numbers, so we arrive to contradiction. So for any $n$ relatively prime to $p$ we have $f(n) = 1$. For any $n = p^{\alpha}m$, where $(m, p) = 1$, using multiplicity $f(p^{\alpha}m) = t^{\alpha}f(m) = t^{\alpha}$. So either $f \equiv 1$, or there exist $t>1$ and prime $p$ s. t. $f(n) = t^{v_p(n)}$. Checking these two answers we see that both of them work, which ends the proof.
10.04.2022 01:21
We claim that that $f \equiv 1$ and $f(n)=c^{v_p(n)}$ where $p$ is a fixed prime number and $c$ is a positive integer constant, both of them clearly work. Assume that $f$ is non-constant. Therefore, there exists $n \in \mathbb{Z}_{>0}$ such that $f(n)>1$. The first condition tells us that if $n=p_1^{e_1}p_2^{e_2}...p_k^{e_k} \implies f(n)=f(p_1)^{e_1}f(p_2)^{e_2}...f(p_k)^{e_k} \implies$ there exists a prime number $p$ such that $f(p)=c>1$. Let such $p$ be minimal. This implies that $f(1)=f(2)=...=f(p-1)=1$, and $f(p+1)=1$ since all its prime factors are less than $p$. Suppose that there is another prime $q>p$ such that $f(q)>1$. From the second condition, there are at least two equal numbers among $1=f(1),f(p^{q-1}-1),f(p^{q-1})=c^{q-1}$. Since $q|p^{q-1}-1 \implies f(p^{q-1}-1)>1 \implies f(p^{q-1}-1)=c^{q-1}$. Again, the second condition tells us that there are at least two equal numbers among $c^{q-1}=f(p^{q-1}-1),1=f(p+1),f(p^{q-1}+p)=cf(p^{q-2}+1) \implies f(p^{q-2}+1)=c^{q-2}$. In general, if $f(p^{q-k}+1)=c^{q-k}$, the second condition gives that there are at least two equal numbers among $c^{q-k}=f(p^{q-k}+1), 1=f(p-1), f(p^{q-k}+p)=cf(p^{q-k-1}+1) \implies f(p^{q-k-1}+1)=c^{q-k-1}$. Hence, doing this until we reach $q-k=2$, we have that $f(p^2+1)=c^2 \implies$ among $f(p^2+1)=c^2,1=f(p-1), f(p^2+p)=cf(p+1)=c$ there are at least two equal numbers, a contradiction, since we have $1,c,c^2$. Therefore, such prime $q$ cannot exist. This gives us that $f(n)=c^{v_p(n)}$ for all $n \in \mathbb{Z}_{>0}$, where $c$ is a positive integer constant. This solves the problem. $\blacksquare$
10.04.2022 01:26
Suppose $p < q$ are minimal primes such that $f(p) > 1$ and $f(q) > 1$. Then at least two of $f(p), f(q-p), f(q)$ are equal, but $f(q-p) = 1$ (since all prime divisors of $q-p$ are less than $q$ and not $p$), so $f(p) = f(q)$. Now, let $r > 1$ be the smallest exponent such that $p^r > q$, thus $q > p^{r-1}$. Write $p^r = sq + t$ where $0<t<q$ and $s<p$ (because otherwise $p^r \geq p^r + t > p^r$). The bounds on $s$ and $t$ imply that $f(s) = f(t) = 1$ (by minimality of $p, q$; also note $t\neq p$ trivially), thus at least two of $f(p)^r, f(sq) = f(q), f(t) = 1$ are equal, a contradiction. It follows that $f(p) > 1$ for at most one $p$ and this gives $f(n) = c^{v_p(n)}$ for some natural number $c$ and some prime $p$, which indeed works.
10.04.2022 02:50
Fun(ny?) The answer is $f(n)=c^{\nu_p(n)}$ for some prime $p$ and $c \in \mathbb{N}$, which clearly works. Call a prime $p$ intriguing if $f(p)>1$, and let $P(a,b)$ denote the second assertion. The key claim is that there is at most one intriguing prime. Indeed, suppose otherwise, and let $p<q$ be the two smallest intriguing primes. Then if $f(a)>1$ for some $a$ and $p,q \nmid a$, it follows that $a>q$, else we get a size contradiction. Now, $P(p,q-p)$ gives $f(p)=f(q)=c>1$, since $f(q-p)=1$. If $q>p^2$, then from $P(p^2,q-p^2)$, two of $f(q)=c$, $f(q-p^2)$, and $f(p^2)=c^2$ must be equal, hence $f(q-p^2)>1$. But since $q-p^2<q$, this is absurd. As such, we have $q<p^2 \iff p^2-q>0$. We now prove the following key claim: Claim: We have $p^2-kq>0$ for all $1 \leq k \leq p$. Proof: Induction on $k$, with the base case of $k=1$ being complete. Now, if $p^2-kq>0$ for $1 \leq k < p$, then $P(kq,p^2-kq)$ gives that two of $f(kq)=c$ (since $k<p \implies f(k)=1$), $f(p^2-kq)$, and $f(p^2)=c^2$ must be equal, hence $p^2-kq>q$ (clearly $p,q \nmid p^2-kq$ since $k<p$), so we have $p^2-(k+1)q>0$ as well. $\blacksquare$ But our claim implies $p^2>pq \implies p>q$, which is absurd. As such, at most one intriguing prime exists. If there exists an intriguing prime $p$, then we can easily extract $f(n)=c^{\nu_p(n)}$ by the first condition, and if no such prime exists then $f \equiv 1$, which also fits by taking $c=1$, so we are done. $\blacksquare$
10.04.2022 10:38
Extremely similar to ISL 2020 N5, in fact I am copying my solution from there with some slight modifications. We claim that all of the solutions have the form $$\boxed{f(n)=A^{v_p(n)}}$$For some prime $p$ and positive integer $A$. It is easy (but not trivial) to check that these functions work. Note that condition (i) just gives $$f(n) =\prod_{p \text{ prime}} f(p)^{v_p(n)}$$If $f(p)=1$ for all primes $p$, then we get $f$ is identically $1$, which fits the bill with $A=1$. Now assume that $f(p) > 1$ for at least one prime $p$. Call all such primes good, and take $p$ to be the smallest good prime. If $f(q)=1$ for all other primes $q$, then we get the required solution with $A=f(p)$. Otherwise, let $q$ be the second smallest good prime. Note that $f$ is unbounded, since its range contains all numbers of the form $f(p)^m$ for $m \geq 1$. Choose an $n>q$ such that $f(n)>f(k)$ for all $k<n$ (such an $n$ exists since $f$ is unbounded). Then condition (ii) gives $f(k)=f(n-k)$ for all $k<n$. Let $m$ be the largest positive integer satisfying $p^m \leq n$. Claim 1: $n=lp^m$ for some $1 \leq l \leq p-1$. Proof: Call $n=n_0$ for now. Since $f(k)=0$ for all positive integers $k<p$, we must have $f(n-k)=0$ as well $\implies$ $p \nmid n-k$ for $k=1,2, \dots p-1$ $\implies$ $p \mid n=n_0$. Let $n_1=\frac{n_0}{p}$. If $n_1<p$, we are done. Else, note that $f(kp)=f(p)$ for all positive integers $k<p$, and $kp<p^2 \leq pn_1$, so $f(pn_1-pk)=f(p)$ as well $\implies$ $f(n_1-k)=1$ $\implies$ $p \nmid n_1-k$ for $k=1,2, \dots p-1$ $\implies$ $p \mid n_1$ $\implies$ $p^2 \mid n$. Then we can define $n_2=\frac{n_1}{p}$ and keep continuing the process until we get $p^m \mid n$. Then, since $p^{m+1}>n$, we will have $n=lp^m$ for some $1 \leq l \leq p-1$, and we are done. $\blacksquare$ Claim 2: $v_p(k)=v_p(n-k)$ for all positive integers $k<n$. Proof: Since $k<n<p^{m+1}$, we must have $v_p(k) \leq m$. If $v_p(k)<m=v_p(n)$, we are trivially done. Else, assume $k=l'p^m$ for some $l'<l$. Then, $n-k=(l-l')p^m$, and $0 < l-l' < l<p$, so $v_p(n-k)=m$ as well, and we are done. $\blacksquare$ Now, clearly $q \nmid n$ since $q \neq p$ and $l<q$. Therefore $q \mid n-r$ for some positive integer $r<q<n$. Note that the only good prime that can possibly divide $r$ is $p$, and so $f(r)=f(p)^{v_p(r)}$. $$\implies f(n-r) \geq f(p)^{v_p(n-r)} \cdot f(q) = f(p)^{v_p(r)} \cdot f(q)=f(r) \cdot f(q)>f(r)$$Contradiction! Therefore there are no solutions in this case. $\blacksquare$
10.04.2022 11:36
I finished my solution with the help of #2.
10.04.2022 12:15
Very nice problem, I really enjoyed while solving this. Since $f(a\cdot 1)=f(a)\cdot f(1)$ we get $f(1)=1$. Obvisously $f(x)=1$ for all $x$ works. Now assume $f$ is not equal to $1$ at all points. If $f(x)=1$ for all prime $x$, we get $f(x)=1$ for all of $x$ from $1$st condition, but it's contradiction, so there are some primes $p_i$ such that $f(p_i)\ne 1$. Let $p$ be the smallest prime such that $f(p)\ne 1$ and let $f(p)=t$. Also let $q$ be the second smallest prime (i.e. $q>p$) such that $f(q)\ne 1$ and let $f(q)=s$. Since $f$ is multiplicative, if all prime divisors of some numbers are less than $q$ and not equal to $p$, then $f$ is $1$ at this point. Therefore $f(q-p)=1$ and $f(q)=s,f(p)=t$. So we get $s=t$. Now let $p^n<q<p^{n+1}$ and let $q=p^n\cdot m+r$. Since $m<p$, $f(p^n\cdot m)=t^n$. Since $r<q$ and $p\nmid r$, $f(r)=1$. And $f(q)=t$. Since at least $2$ of $t^n,1,t$ are equal, we get $n=1$. So $p<q<p^2$. Now let $p^2=q\cdot k+l$.Observe that $k<p$, so $f(qk)=f(q)=t$. $l<q$ and $p\nmid l$, so $f(l)=1$. Also $f(qk+l)=f(p^2)=t^2$. But since all of $1,t,t^2$ are distinct, we get contradition. So $f(x)=1$ for all primes,except $p$. Since $f$ is multiplicative function, we get $f(x)=t^{v_p(x)}$. So the answer is $f(x)=t^{v_p(x)}$, for some constant $t$ and some fixed prime $p$ and it contains all solutions because $f\equiv 1$, when $t=1$. So we are done!
10.04.2022 12:33
How about this way of avoiding looking at $p^n < q < p^{n+1}$? Clearly, $f\equiv 1$ works, so suppose $f(m) > 1$ for some $m>1$. By the first condition we may assume that $f(p) > 1$ for at least one prime $p$ -- take $p$ to be minimal. If there are no other primes $q$ with $f(q) > 1$, then $f(n) = f(p)^{\nu_p(n)}$, which indeed satisfies the given conditions. So suppose otherwise and let $q$ be the least prime greater than $p$ with $f(q) > 1$ -- the advantage of this is that $q-p$ has all its prime divisors less than $q$ and different from $p$ and so $f(q-p) = 1$. The second condition implies that at least two of $f(p)$, $f(q)$ and $f(q-p) = 1$ are equal, hence $f(p) = f(q)$. Now if $p^2 < q$, then among $f(p^2) = f(p)^2$, $f(q) = f(p)$ and $f(q - p^2) = 1$ (all prime divisors of $q - p^2 < q$ are less than $q$) there are two equal, contradiction. Hence $p^2 > q$ and so among $f(p^2) = f(p)^2$, $f(q) = f(p)$ and $f(p^2 - q)$ there are two equal. In particular, $f(p^2 - q)$ is \textbf{not} equal to $1$ and hence $p^2 - q$ has a prime divisor which is $p$, $q$ or greater than $q$ - but since $p^2 - q$ is not divisible by $p$ or $q$, we deduce $p^2 - q > q$, i.e. $p^2 > 2q$. Now similarly among $f(p^2) = f(p)^2$, $f(2q) = f(2)f(q) = f(p)$ and $f(p^2-2q)$ there are two equal numbers, so $p^2 - 2q > q$, giving $p^2 > 3q$. Continuing up until $p^2 > pq$, we reach a contradiction via the minimality of $p$. Indeed, if $p^2 > nq$ for some $n<p$, then among $f(p^2) = f(p)^2$, $f(nq) = f(n)f(q) = f(p)$ and $f(p^2-nq)$ there are two equal numbers, so $f(p^2-nq)>1$, implying $p^2-nq>q$, i.e. $p^2>(n+1)q$.
10.04.2022 14:16
Here it is a different approach I found to solve the problem. Clearly $f(1)=1$. So we get at least two of the numbers $1, f(n)$ and $f(n+1)$ are equal with each other. Now we will prove the following claim. Claim: $f(n)=1$ or $f(n+1)=1$ for all positive integers $n$. Proof: Suppose that there exist a positive integer $n$ such that $n$ $f(n)\neq 1$ and $f(n+1)\neq 1$. This means that $f(n+1)=f(n)$. Since from $1, f(n+1)$ and $f(n+2)$ at least two of the numbers should be equal we get that $f(n+2)=1$ or $f(n+2)=f(n+1)$. If $f(n+2)=1$ then because $1, f(n^2+2n)$ and $f(n^2+2n+1)$ at least two of the numbers should be equal and from first condition we get that, at least two of the numbers $1, f(n)f(n+2)=f(n)$ and $f(n+1)^2=f(n)^2$ should be equal, which is a contradiction because we always get $f(n)=1$. This means $f(n+2)=f(n+1)$ hence $f(n)=f(n+1)=f(n+2)$. Inductively this means that $f(n)=f(m)$ for all $n\leq m$. Because $n\leq n^2$ we get that $f(n)=f(n^2)=f(n)^2\Rightarrow f(n)=1$ a contradiction, as desired. Now if $f(p)=1$ for all prime numbers $p$ then from condition 1 we get that $f(n)=1$ for all positive integers $n$ which clearly is a solution. Now we suppose there exist a prime number $p$ such that $f(p)=c\neq 1$. Then from condition 1 we get $f(kp)=f(k)f(p)=cf(k)\neq 1$ so if $p|n$ then $f(n)\neq 1$. Now from the claim at least one of the numbers $f(kp)$ or $f(kp+1)$ is equal to $1$ this means that $f(kp+1)=1$, hence if $n\equiv 1\pmod p$ we get $f(n)=1$. Now let $n$ be a positive integer such that $n\not\equiv 0\pmod p$, then there exist a positive integer $m$ such that $n\cdot m \equiv 1 \pmod p$ hence from condition 1 and last relation we get $f(n)f(m)=f(nm)=1\Rightarrow f(n)=1$. Hence if $n\not\equiv 0\pmod p$ then we get $f(n)=1$. Now if $n\equiv 0 \pmod p$ from codition $1$ we get that $f(n)=c^{v_p(n)}$. In conslusion all functions which satisfy condition is $f(n)=c^{v_p(n)}$ for all positive integer $n$ and $c$ is any positive integer constant and is not hard to prove these type of functions actually work.
10.04.2022 14:26
10.04.2022 14:28
Solved with Inferno2401. We claim that $f(n) = k^{v_p(n)} \forall n \in \mathbb{N}$ for some $k \in \mathbb{N}$. It can be seen that this indeed works. First, a = b = 1 gives f(1) = 1. Also note that $a | b \implies f(a) | f(\frac{b}{a})f(a) = f(b)$. Note that repeated application of (i) gives $f(n) = \prod_{p \in \mathbb{P}} f(p)^{v_p(n)}$ where $\mathbb{P}$ denotes the set of primes. Suppose $f(p) = 1 \forall p \in \mathbb{P}$, then we are done(choose $k = 1$). Otherwise, there is a prime $p$ such that $f(p) > 1$. Claim 1: If $p \in \mathbb{N}$ and $f(p) \neq 1$, then $f(p-1) = f(p+1) = 1$. Proof: We have that at least 2 elements are equal in each of {$f(1)=1, f(p-1), f(p)\neq1$}, {$f(1)=1, f(p+1), f(p)\neq1$}, {$f(1)=1, f(p^2-1), f(p^2)=f(p)^2\neq1$} so that $f(p-1) = 1$ or $f(p), f(p+1) = 1$ or $f(p)$ and $f(p^2-1) = f(p-1)f(p+1) = 1$ or $f(p)^2$, thus $f(p-1)$ and $f(p+1)$ are both $1$ or $f(p)$. Suppose $f(p-1) = f(p)$. Then as $f(p-1) \neq 1, f(p-2) = f(p) (= f(p-1))$, and similarly $f(p-3) = f(p-1)$ since $f(p-2) = f(p) \neq 1$. Continuing, we have $f(t) = f(p) \forall t < p$, and in particular for $t = 1$, we get $1 = f(p)$, a contradiction. Hence $f(p-1) = 1 (= f(p+1)$ as well) as required. Claim 2: (Well-known) Let $p, q \in \mathbb{P}$, $p \neq q$. Then there exists $k \in \mathbb{N}$ such that $p^k \equiv 1 (\text{mod } q)$. Proof: Consider the infinite sequence {$p^k$}$_{k = 1}^{\infty}$ modulo $q$. By the PHP, there exists $i, j$ with $i < j$ such that $p^i \equiv p^j (\text{mod } q)$ and so $p^{j-i} \equiv 1 (\text{mod } q)$ and so choosing $k = j - i$ we are done. We are ready to conclude. Since there is a prime $p$ with $f(p) > 1$, we get $f(p^k) = f(p)^k \neq 1 \forall k \in \mathbb{N}$ and so by Claim 1, $f(p^k - 1) = 1 \forall k \in \mathbb{N}$. Consider a prime $q \neq p$ and choose $k$ such that $p^k \equiv 1 (\text{mod } q)$(possible by Claim 2). So for this $k$, $q | p^k - 1$ and hence $f(q) | f(p^k - 1) = 1 \implies f(q) = 1$. Hence f(q) = 1 for all primes $q \neq p$. Hence we conclude $f(n) = f(p)^{v_p(n)} \forall n \in \mathbb{N}$, as claimed.
10.04.2022 16:10
The answer is $\boxed{f\equiv 1}$, and $\boxed{f(a)=c^{\nu_p(a)}}$, where $c>1$ is a constant positive integer and $p$ is a prime. It's easy to check they work. We now prove they are the only solutions. Note that by setting $a=1$ in the first equation, we obtain $f(1)=1$. Clearly $f\equiv 1$ works, so we assume $f$ is not identically $1$. In other words, there exists a prime $p$ with $f(p)>1$. Note that if $f(x)>1$, then there exists a prime divisor $x_1$ of $x$ such that $f(x_1)>1$. Claim: There exists no prime $q\ne p$ with $f(q)>1$. Proof: Suppose FTSOC there exist two primes $p<q$ with $f(q)>1, f(p)>1$, and $p,q$ are minimal. Setting $a=q-p$, $b=p$, we have $f(q-p), f(p), f(q)$ are equal. Now $q-p<q$ and $p\nmid q-p$, so $f(q-p)=1$. Thus, $f(p)=f(q)$. We will first show that $p^2>q$. Suppose that $p^2<q$ (clearly $p^2\ne q$). Then set $a=p^2$ and $b=q-p^2$. Then since $f(q-p^2)=1$, $f(p^2)=f(q)$, so $f(q)^2=f(q)\implies f(q)=1$, a contradiction. Thus, $p^2>q$. Now let $p^2=xq+y$, where $x,y$ are positive integers and $y<q$. Note that two of $f(xq), f(y), f(p^2)$ are equal. We have $f(xq)=f(x)f(q)$ and $f(p^2)=f(q)^2$. However, since $pq>p^2$, $x<p$, which implies $f(x)=1$. So $f(xq)=f(q)\ne f(p^2)$. Since $y<q$, all prime factors of $y$ are less than $q$, so $f(y)=f(p)^{\nu_p(y)}$. However, this is either $1$ or $f(p)$, so it isn't equal to $f(p^2)$. This implies $f(xq)=f(y)$, so $f(q)=f(y)$. Thus, $y$ is a multiple of $p$, since $y<q$. But then $p^2-y=xq$ is a multiple of $p$. However, $x$ and $q$ are both not divisible by $p$, a contradiction. $\blacksquare$ Thus, $p$ is the only prime for which $f(p)>1$. The function $f(a)=c^{\nu_p(a)}$ follows, where $c=f(p)$.
10.04.2022 19:45
Let $p$ be the smallest integer such that $f(p)=a\neq 1$ (if this doesn't exist we are done). Notice that by the multiplicative property $p$ is prime. Claim: $f(p^k-1)=1$ for $k\in \mathbb{N}$ Pf: Induct, with the base case $k=1$ being by definition of $p$. Two amongst $$f(p(p^{k-1}-1)), f(p-1) , f(p^k-1)$$are equal, and from $f(p-1)=1$ and $f(p(p^{k-1}-1))=f(p)f((p^{k-1}-1)=a$ by the induction hypothesis, it must hold that $f(p^k-1)\in \{1, a\}$. Also two amongst $$f(p^k-1), f(1), f(p^k)$$are equal, and from $f(1)=1$, $f(p^k)=a^k\neq a$ ($k>1$) we get $f(p^k-1)\in \{1, a^k\}$. Thus we must have $f(p^k-1)=1$. $\blacksquare$ Claim: If $q$ coprime with $p$, then $f(q)=1$. Pf: This means that there exists an integer $k$ such that $q\vert p^k-1$. But as $f(p^k-1)=1$ by our first claim, we cannot have $f(q)>1$ (apply the multiplicative property). $\blacksquare$ Hence it follows that $f(n)=a^{\nu_p(n)}$ for all $n\in \mathbb{N}$, where $p$ is prime and $a\in \mathbb{N}$. It is easy to verify that all such functions work.
10.04.2022 20:51
Really liked it If $f$ is constant then $f \equiv 1$ works, so assume not. Let $p$ be the smallest number such that $f(p)>1$, if $p$ is composite then it has some prime factor such that $f(\text{that prime factor})>1$ which contradicts the minimality of $p$ hence $p$ is prime. (Here we consider the case when $p>2$). Also let $P(a,b)$ denote the second assertion. Claim: $f(p^n+1) = 1$ for all $n\ge 1 \in \mathbb N$. Proof. We prove this by induction on $n$, firstly note that $p+1$ is not prime so the prime factors of $p+1$ are $<p$ hence $f(p+1)=1$. Assume $f(p^n+1) >1$, by $P(p^n , 1)$ we have $f(p^n + 1)=f(p^n)$, also note that $(p^n +1) + (p^{n-1} + p) = (p^{n-1}+1)(p+1)$, clearly $f(p^{n-1} + p) >1$ and $f((p+1)(p^{n-1} + 1)) =1$ hence the only possibility is that $f(p^n + 1)=f(p^{n-1} + p) \implies f(p)^n = f(p)f(p^{n-2} + 1) = f(p)$ which is a contradiction (case when $n=2$ can be ruled out by hand). Now, take any prime $q \neq p$ and assume that $f(q)>1$. Choose suitable and large enough $n$ such that $q\mid p^n-1$ (say by Fermat's Little theorem) then $f(p^n - 1) \ge f(q) > 1$ and by $P(p^n - 1, 1)$ we have $f(p^n) = f(p^n-1)$. Noting that $n$ is even, we have the identity $(p^n - 1)^2 + (2p^{n/2})^2 = (p^n + 1)^2$ which means $f((p^n - 1)^2)=f((2p^{n/2})^2)$ [by above claim], implying that $$f(p)^n = f(p^n - 1)=f(2)f(p)^{n/2} \implies f(2)=f(p)^{n/2} > f(p)$$which is a contradiction since $f(2) =1$. So for all primes $q \neq p$ we have $f(q)=1$ which means that for any natural $a$ with $\nu_p(a)=0$ we have $f(a)=1$. To finish $$f(n) = f(p^{\nu_p(n)}) f\left(\dfrac{n}{p^{\nu_p(n)}}\right) = \boxed{f(p)^{\nu_p(n)}.}$$
10.04.2022 23:30
Obviosly, $f(1)=1$. Moreover, since function $f$ is multiplicative it is sufficient for us to find the value of $f(p)$, where $p$ is prime, for every prime $p$. Suppose that $p$ is the smallest prime $p$ such that $f(p) =c \neq 1 $. If such prime does not exist then $f(n)=1$ for every positive integer $n$. Otherwise $f(1) = f(2) = \ldots = f(p-1) = f(p) = f(p+1)$ from the definition of $p$ and $f(p^{\alpha}) =c^{\alpha}$ from easy induction. The key claim is the following. Claim: For every positive integer $k$ we have $f(p^k +p^{k-1} + \ldots + p +1)=1$ Proof: We proceed by induction with the base already being done. Suppose that $f(p^{l-1}+p^{l-2}+ \ldots +p+1)=1$ for some positive integer $l$. From the second condition we know that among the numbers: \begin{align*} \{ f(p^l), f(p^{l-1}+\ldots+p+1), f(p^l+p^{l-1}+\ldots+p+1) \} = \{ c^l, 1, f(p^l+p^{l-1}+\ldots+p+1) \} \\ \{ f(p^{l+1}-1), f(1), f(p^{l+1}) \} = \{ f(p^l+p^{l-1}+\ldots+p+1), 1, c^{l+1} \} \end{align*}at least $2$ are equal. But since $c \neq 1$ from the above we can easily deduce that $f(p^l+p^{l-1}+\ldots+p+1) =1$ as desired. Now consider arbitrary prime $q$ with $p>q$. From Fermat's last theorem we have $p^{q-1} -1 \equiv 0 \pmod q$. Note that: $$ f(p^{q-1}-1) =f(p-1)f(p^{q-2} + p^{q-3}+ \ldots + p+1) = 1 $$On the other hand $f(q) \mid f(p^{q-1}-1)$ meaning that $f(q)=1$. Repeating this process for every prime $q$ we can easily deduce that $f(n) = c^{\nu_p(n)}$ is solution, which indeed works. Remark: Above arguments does not work for $p=2$ if $f(3) \neq 1$. But this issue can be easily prevented. Among the numbers $f(1)=1$, $f(2)$, $f(3)$ at least $2$ are equals. If $f(3) =1$ then problems is resolved. Otherwise $f(2) =f(3)$, but on the other hand among the numbers $f(1), f(3), f(4) = f(2)^2 =f(3)^2$ at least 2 equals, meaning that $f(2) =f(3)=1$ which is contradiction.
11.04.2022 04:12
Let $P(a,b)$ denote the assertion that at least two of $f(a)$, $f(b)$, and $f(a+b)$ are equal. Let $p$ be the least prime number such that $f(p) \neq 1$. If no such $p$ exists, then $f(x) \equiv 1$, which is a solution. Case 1: $p = 2$. Assume FTSOC that at least one other prime does not evaluate to $1$, and let $q$ be the least such prime. Then $P(q-1,1)$ together with $P(q,1)$ imply that $f(q) = 1$, a contradiction. Hence, $f(x)\equiv f(2)^{v_2(x)}$, which is a solution. Case 2: $p > 2$. Again, assume FTSOC that at least one other prime does not evaluate to $1$, and let $q$ be the least such prime. Then $P(q-p, p)$ implies that $f(q) = f(p)$. Let $1\le g\le p-1$ be a primitive root modulo $p$, and choose suitable $r$ and $s$ such that $g^r\equiv -q\pmod{p}$ and $g^r(p+1)^s\equiv -q\pmod{p^2}$. Then $P\left(g^r(p+1)^s, q\right)$ implies that $f(q) = f\left(g^r(p+1)^s + q\right)$, absurd, and we have a contradiction. Hence, $f(x)\equiv f(p)^{v_p(x)}$, which is a solution. In summary, the only solutions are $f(x)\equiv f(p)^{v_p(x)}$ for a prime $p$.
11.04.2022 16:47
We claim the only answers are $f(a)=1$ and $f(a)=c^{v_p(a)}$ for all $a$, where $p$ is a prime and $c$ a positive integer, which trivially work. Now let's prove they are the only solutions. Let $p$ be the smallest positive integer such that $f(p) \neq 1$. If it doesn't exist, then the solution is $f(a)=1$. If it does, $p$ must be a prime, and if we let $c=f(p)$, we will prove $f(a)=c^{v_p(a)}$ by induction. Let $a=k\cdot p^i + b$, where $1\leq k < p$ and $0\leq b <p^i$, and we will use strong induction over $i$. Base case ($i=0$) is trivial by definition of $p$. Lets suppose $f(a)=1$ for all $a$ coprime with $p$, $a=k\cdot p^i + b \forall i=1,2,...t-1$, this is, $a<p^{t-1}$. Let $a=k\cdot p^t + b$. Then: $$f(k^4p^{4t})=f(b^2p^{2t}k^2+k^2p{2t}(k^2p{2t}-b^2))=c^{4t}$$$$f(b^2p^{2t}k^2)=f(b)^2f(k)^2c^{2t}=c^{2t}$$$$f(k^2p{2t}(k^2p{2t}-b^2))=f(k)^2f(kp^t-b)f(kp^t+b)c^{2t}=f(kp^t+b)c^{2t}$$ So either $f(kp^t+b)=1$ or $f(kp^t+b)=c^{2t}$, but since $f(b)=1$ and $f(kp^t)=c^t$, we must have $f(kp^t+b)=1$, and since $f$ is multiplicative, we are done.
11.04.2022 22:25
The answer is $f\equiv1$ or $f(x)=f(p)^{v_{p}(x)}$ for all $x$ and some prime $p$. It's easy to notice that $f(1)=1$. As I already mentioned $f\equiv1$ is the solution. Assume there is $p$ such that $f(p)\neq1$. Obviously $p$ is a prime. We are claiming that $p$ is only such prime. Assume contradiction let $q$ be a prime number and $f(q)\neq1$. Consider (2) on $f(q-p),f(p),f(q)$ triple. Since $p\nmid q-p$ and $q\nmid q-p$ we have $f(q-p)=1$. Therefore $f(p)=f(q)$. Let $q-k$ be a remainder of $p^2$ when divided by $q$. Obviously $p\nmid k+p^2$. Since $ \frac{k+p^2}{q}<q$ and $k<q$ we have $f(k+p^2)=f(q)=f(p)$ and $f(k)=1$. Consider (2) on $f(p^3q),f(kpq),f(pq(k+p^2))$ triple. $f(p^3q)=f(p)^4$ , $f(kpq)=f(p)^2$ , $f(pq(k+p^2))=f(p)^3$. So $f(p)=1$ contradiction. Therefore $p$ is only prime that doesn't equal $1$. So we have $f(x)=f(p)^{v_{p}(x)}$ and we are done.
13.04.2022 06:06
Now we prove that it is the only one. First, plugging in $a = 1$ into (i) tells us $f(1) = 1$. Now the main claim is this: Claim: There exists at most one prime $p$ such that $f(p) > 1$ Proof: Suppose FTSoC that there exist multiple primes such that $f(p) > 1$. Let $p_1$ and $p_2$ be the smallest of such primes, with $p_2 > p_1$ Now consider the number $p_2 - p_1$. It can only be composed of primes less than $p_2$ and is not divisible by $p_1$, so by (i) and the assumption of minimality, we must have $f(p_2 - p_1) = 1$. Now plugging in $(p_1, p_2 - p_1)$ into (ii) tells us $f(p_1) = f(p_2)$ as we've assumed both are greater than $1$. We must have $f(p_1) = f(p_2)$, and call this common value $K$. Let $d$ be the smallest positive integer such that that $p_1 ^ d > p_2$ (note that $d$ is greater than one). By minimality, we have $p_1 ^ {d - 1} < p_2$, so $p_1 ^ d < p_1 \cdot p_2$. Now note that there exist positive integers $k$ and $r$ such that $p_1 ^ d = kp_2 + r$, where $1 \leq r < p_2$ by division and $1 \leq k < p_1$ as obtained before. Now consider the values of $f(kp_2)$, $f(r)$, and $f(p_1 ^ d)$ By (i) we have $f(kp_2) = f(k) \cdot f(p_2) = K$ as $k$ has to be composed of primes less than $p_1$ because it is less than $p_1$ We already know that $r$ is less than $p_2$, and it cannot be divisible by $p_1$ as $kp_2$ is not divisible by $p_1$. Therefore, $r$ is composed of primes less than $p_2$ and does not include $p_1$, which means by (i) we have $f(r) = 1$ Finally, we know by (i) that $f(p_1 ^ d) = f(p_1)^d = K ^ d$ However, now plugging in $(kp_2, r)$ into (ii) immediately gives us a contradiction because we get $K$, $1$, and $K ^ d$ (we set $kp_2 + r$ to be equal to $p_1 ^ d$), and no two of these values are equal. Therefore, the original claim must be true $\square$ Now we are ready to finish the problem. Suppose there exists an integer $m$ such that $f(m) > 1$ (otherwise, we get $f(x) = 1$ for all $x$, which is what the function becomes when $K = 1$). Then by (i) there must exist a prime divisor $p$ of $m$ such that $f(p) > 1$, and call this value $K$. By a repeated application of (i), we easily get $f(p^n) = K^n$ for any positive integer $n$. Then for any positive integer $x$, we can write it as $c \cdot p^n$, where $c$ is not a a multiple of $p$, which by definition means $v_p(x) = n$. Now because $c$ is not a multiple of $p$, then $f(c) = 1$ as $c$ is composed of any prime excluding $p$, which we've already established must have an output of $1$ as $p$ does not. So finally, $$f(x) = f(c \cdot p^n) = f(c) \cdot f(p^n) = K ^ n = K ^ {v _ p(x)}$$as desired $\blacksquare$
14.04.2022 08:04
Very similiar to IMO2020/N5
15.04.2022 10:28
Clearly, $f(1)=1$ as $f(a\cdot 1)=f(a)f(1)$. Notice that $f\equiv 1$ is a solution. So, assume $f$ is not $1$ and let $p$ be the smallest natural number such that $f(p)\neq 1$ and for $p$ to maintain it being minimal, $p$ has to be to prime. Note that, if $n=p_1^{\nu_{p_1}(n)}\cdot p_2^{\nu_{p_2}(n)}\dotsc p_m^{\nu_{p_m}(n)}$ then $f(n)=f(p_1)^{\nu_{p_1}(n)}\cdot f(p_2)^{\nu_{p_2}(n)}\dotsc f(p_m)^{\nu_{p_m}(n)}$ Claim 1 - $f(p^k-1)=1$ for any natural number $k$. Proof - We start inducting on $k$. For $k=1$, the claim is true otherwise there would exist a prime $q<p$ dividing $p-1$ such that $f(q)=1$. Notice that $(p^k-p)+(p-1)=p^k-1$ so at least two of $f(p^k-p)$, $f(p-1)$ and $f(p^k-1)$ are equal. Also, $f(p^k-p)=f(p(p^{k-1}-1))=f(p)f(p^{k-1}-1)$. Clubbing our induction hypothesis and the fact that at least two of $f(p^k-1), f(1)$ and $f(p^k)$ are equal. We can conclude that our claim is true. Claim 2 - If $q$ is a prime such that $q\neq p$, $f(q)=1$. Proof - There exists infinitely many $k$ such that $q\vert p^k-1$. Hence, it forces $f(q)$ being $1$. Since, $f(n)=f(\frac{n}{p^{\nu_p(n)}})f(p)^{\nu_p(n)}$. Therefore, $f(n)=f(p)^{\nu_p(n)}$.
19.04.2022 21:50
Suppose there exists $a$ such that $f(a)>1$ (otherwise $f\equiv 1$ and we are done), then $f(a^n)=f(a)^n$ implies $f$ is unbounded above, and so the set $$S=\{a:f(a)>f(b) \text{ for all }b<a\}$$contains an infinite amount of elements. Then, for every $n\in S$, we must have $f(k)=f(n-k)$ for $k<n$, since $f(n)$ is bigger than both. Let $g=\log (f)$. By ISL 2020 N5, $g(x)=k\cdot \nu_p(x)$ for some prime $p$ and real $k$. Then $f(x)=e^{k\cdot \nu_p(x)}=A^{\nu_p(x)}$ for some constants $A,p$ with $p$ prime.
20.04.2022 16:55
Obviously, $f(1)=1$. Let $p$ be the least prime number such that $f(p)>1$. If $f(p)=1$ for all prime $p$, then $f(x) \equiv 1$, which is a solution. Note that two of $f(p),f(kp^2-p),f(kp^2)$ are equal. But $f(kp^2)=f(k)f(p)^2>f(k)$ Case 1: exist $k\in \mathbb{N}$ such that $f(kp^2)=f(kp^2-p) \rightarrow f(kp-1)=f(kp)=c>1$ We start with main claim: Claim : exist positive integer $t$ such that $f(t)=f(t+1)=c$ and $f(t+2)=1$ Proof : assume contradiction. We consider $f(1),f(kp),f(kp+1)$. That means $f(kp+1)=c$ due to $f(kp)>1$ and $f(kp+1) \neq 1$. By induction, that means $f(x)=c>1 \forall x\geq kp-1$. Contradiction due to multiplicative. So we get $f(1)=1$,$f(t^2+2t)=f(t)f(t+2)=c>1$ and $f(t^2+2t+1)=c^2>c>1$ contradiction. Case 2: $f(kp^2-p)=f(p)$ for all $k \in \mathbb{N} \rightarrow f(kp-1)=1$ for all $k \in \mathbb{N}$ For prime $q \neq p$, we choose $k=p^{q-2}$. That means $f(p^{q-1}-1)=1$. By Fermat, $f(q)=1$ for all prime $q \neq p$. So we have $f(x)=f(p)^{v_p(x)}$ as desired.
17.08.2022 10:40
Answer it enough to know f on prime f from prime to prime such that there is at most one prime p such that g(p)>1. Prove f(1)=1 and let p be smallest number such that f(p)=M >1 ( if p not exist then f(x)=1 for all x). We claim that for all q not divisible by p we have f(q)=1. if there is exist, take smallest q then q is prime If q<p is obvious. Let p<q<p^2. Then take f(q), f(p), f(q-p) We have f(q)=f(p). Let p^2=aq+r (a<p so r not divisible by p) Take f(p^2), f(aq), f(r) we have contradiction. Similarly with p^n<q<p^(n+1). Then f(q)=f(p^n). Take p^(n+1)=aq+r. Then a<p so r not divisible by p so take f(p^(n+1)), f(aq), f(r) we have contradiction. So all f is take a prime p and f(n) =f(p)^vp(n).
23.09.2022 06:26
Interesting. We claim the answer if $f(n)=C^{v_p(n)}$ for some positive integer constant $C$. First, notice that $f(1)=f(1)^2 \Rightarrow f(1)=1$. Let $n=p_1^{\alpha_1} p_2^{\alpha_2} \cdots p_k^{\alpha_k}$. We have $f(n) = f(p_1)^{\alpha_1} f(p_2)^{\alpha_2} \cdots f(p_k)^{\alpha_k}$. If $f(p)=1$ for every prime $p$ then $f(n)=1$ for all $n$. Now, aftoc that there are two distinct primes $p$ and $q$ where $f(p) \not = 1$ and $f(q) \not = 1$. By condition (ii), we have at least one pair of $f(1), f(pk),$ and $f(pk+1)$ are equal. Notice that $f(1)=1$ and $f(pk)=f(p)f(k) > 1$. So, $f(pk+1)=1$. By CRT, we can choose $k$ where $q$ divides $pk+1$. Thus, $1 = f(pk+1)=f(q \ell)=f(q)f(\ell)>1$. Contradiction. So, there is exactly zero or one primes $p$ where $f(p)>1$. From, here, $f(n)=C^{v_p(n)}$ is clearly the only solution.
03.10.2022 21:45
@above, what if $f(pk)=f(pk+1)>1$? You have to prove that $f(n)=f(n+1)>1$ is impossible, which can be done as follows: Suppose FTSoC that there is such $n$; plugging $(n^2-1,1)$ gives that $f(n^2-1)=f(n-1)f(n+1)=f(n)^2$, hence $f(n)=f(n-1)>1$ and with an easy induction we get that $f(k)=f(1)=1$ for all $k \leq n$, contradiction, since $f(n)>1$.
04.01.2023 20:38
I didn't see this approach, albeit similar to the ones above. The only solution is $f(n)=c^{v_p(n)}$ which clearly works. By multiplicity, $f(1)=1$. Assume $p>2$ is the smallest number such that $f(p)>1$. Due to multiplicity, $p$ is prime. Also, assume a second $f(q)>1$ exists where $(p,q)=1$. Again, $q$ is prime. Claim: If $f(m)\neq1$, $m\le q+1$ and $m\neq q$, then $p\mid m$. Proof: Obvious by minimality of $q$ and multiplicity. Consider the partitions of $\mathbb{N}$ by multiples of $q$. Look at one such, namely $\left(qk,q(k+1)\right]$ where $p\nmid k,k+1$ and let $pt$ be strictly inside it. Then $\left\{f(pt-qk),f(pt),f(qk)\right\}$ has two elements equal where $pt-qk<q$ and $p\nmid k\stackrel{\text{Claim}}{\Longrightarrow} f(pt-qk)=1$. Because $f(pt),f(qk)\neq1$, we get $f(qk)=f(pt)$. In the same way, looking at $\left\{f(q(k+1)-pt),f(pt),f(q(k+1)\right\}$ we get $f(q(k+1))=f(pt)$. Hence \[f(k)=f(k+1) \text{ whenever }p\nmid k,k+1.\]This makes $f$ constant between multiples of $p$ and since $p>2$, at least one of $q-1,q+1$ isn't divisible by $p$ but it's image is equal to $f(q)>1$. This contradicts the Claim. If $p=2$, look at $\left\{f(q-1),f(q),1\right\}$ and $\left\{f(q+1),f(q),1\right\}$. They give $f(q-1)=f(q+1)$ but only one of $q-1,q+1$ is divisible by $4$, a contradiction. The conclusion follows.
24.08.2024 12:50
Answers are $f(n)\equiv 1$ and $f(n)=c^{v_p(n)}$ for a constant $c>1$. Suppose that $f$ is not equavilent to $1$. Take a prime $f(p)>1$. Note that $f(a^k)=f(a)^k$. When we plug $a=p^m, \ b=p^{m+k}-p^m$ in the second condition, we get that two of $f(p)^m, \ f(p)^{m+k}, \ f(p)^mf(p^k-1)$ are equal. $f(p)>1$ yields $f(p^k-1)=\{1,p^k\}$. If $f(p^k-1)=1$ for all $k$, then take a prime $q$ and $q-1|k$. We have $q|p^k-1$ thus, $f(q)|f(p^k-1)=1$ so $f(p)=1$ for $q\neq p$. This gives that $f(np^m)=f(n)f(p)^m=f(p)^m$. Hence we have the solution $f(n)=c^{v_p(n)}$. Now assume that there exists an integer $k$ such that $f(p^k-1)=p^k$. This gives that there exists a prime $q$ which satisfies $p|f(q)$. Two of $\{f(1),f(p^k-1),f(p)^k\}=\{1,p^k,f(p)^k\}$ are equal so $f(p)=p$. Since $f(q)>1,$ we have $f(q^m-1)=\{1,q^m\}$. Two of $\{1,f(q^m-1),f(q)^m\}$ are equal. Thus, $\{1,q^m\}=f(q^m-1)=\{1,f(q)^m\}$ which yields $f(q^m-1)=1$ for all $m$ or $f(q)=q$ and this is impossible since $p|f(q)$ hence $f(q^m-1)=1$ for all $m$. But taking $p-1|m$ gives $f(p)|f(q^m-1)=1$ which is a contradiction.$\blacksquare$