How does one find all $f:\mathbb {Z} \rightarrow \mathbb {Z}$ that satisfies the following: $$f(gcd(x,y))=gcd(f(x),f(y))$$ I had suspected that there would be some results concerning this functional equation but was unable to find any.
It appears that the only solution for $f(x)$ would be $f(x)=cx^r$ for fixed integers $c,r$. However, I was unable to prove or disprove the statement.
Any help would be appreciated.