It is well known that the only solution is $f$ a constant function. However, by putting some restrictions on the functional equation, we might get other solutions, with potential implications to solving Diophantine equations or factoring an integer.

The restrictions are as follows: $f(xy)=f(x+y)$ if $x,y\geq 3$ are positive integers and $\gcd(x,y)=1$. Now my question is whether or not there is a non-constant function satisfying these requirements. I consider that $f(u)$ is defined for integers $u\geq 7$.

Let $f$ be a solution. I use the following notation: $u\sim v\bmod{f}$ if and only if $f(u)=f(v)$. This defines equivalence classes, just like modulo operators define residue classes. Various functional equations similar to the one discussed here, produce various sets of equivalence classes, in the same way that various moduli produce various sets of residue classes.

**Link to Diophantine equations and factoring**

This is just a trivial example to illustrate the concept. Using various non-constant $f$ solutions of various related functional equations, we can replace the equation $x^2 + y^2 = z^2$ by $(xy)^2 \sim z^2 \bmod{f}$ if we could come up with a large class of $f$'s that make the two equations equivalent. In short, we reduce an additive equation with $k$ variables (here $k=3$) to one having $k-1$ variables.

Likewise, factoring $z$ consists of finding $x,y$ such that $xy=z$. It is equivalent to solving the additive equation $x+y \sim z$ for various $f$'s, hopefully easier to handle once turned from a multiplicative into an additive problem.

**But do non-constant solutions $f$ really exist?**

That is my question. A corollary, assuming such functions exist, is how difficult they are to handle, and even whether finding such a function could be an unsolved problem for years to come.

If such non-constant functions exist and are rather simple, then Fermat's theorem would have been proved long ago. This makes me think that either they don't exist, or if they exist, they are a tough nut to crack.

**Possible approach to finding a non-constant $f$**

I define $f(u)$ as the smallest integer $v\geq 7$ such that $u\sim v \bmod{f}$. Again, see the analogy with residue classes.

Now let's start with $u=7$. We have $7=3+4$, thus $7\sim 12$. We have $12=5+7$, thus $7\sim 12\sim 35$. Apply the principle recursively, and you will get an infinite equivalence class for $7$. Does it cover all integers $\geq 7$? If yes the only solution for $f$ is $f(u)=7$ (a constant function).

Now let's start with $u=11$. We also end up with an infinite class, seemingly larger than the previous one, and apparently containing all prime numbers $>7$ and many non-primes. In particular

$$11 \sim 13 \sim 17\sim 19 \sim 23 \sim 24\sim 25 \sim 28 \sim 29 \sim 30\sim 31 \sim 36 \sim 37 \sim 40\sim 41$$

How many equivalence classes do we end up with? One? (then $f$ is constant.) Two? Three? More than three? Note that finding the equivalence classes consists of finding all the connected components of an undirected (infinite) graph.

If you prove that $7\sim 11$, that won't answer my question, but it will be a big blow, big enough that I may stop doing research on this topic. And I would accept the answer. Likewise, if you prove that $7$ and $11$ are not equivalent ($\bmod{f}$) it will show that a non-constant $f$ exists, and this would be a big encouragement.

**Update**

See solutions provided by readers. The possibility of the existence of a non-constant function $f$ was "too good to be true". That said, the functional equation discussed here is a particular case of $a f(xy)= b f(x+y) +c$ with $a,b,c$ integers. Or something more general like (say) $f(xy)=f(g(x+y))$ for some function $g$. Maybe a non-constant solution can be found in this setting. In the end, the goal is to transform an additive problem into a multiplicative one, or the other way around. And to do it in such a way that it leads to simplifications.