MathLabs

Problem 3

Find all functions g:Z>0→Z>0g:\mathbb{Z}_{>0}\to\mathbb{Z}_{>0} such that (g(m)+n)(g(n)+m)\left(g(m)+n\right)\left(g(n)+m\right) is a perfect square for all m,n∈Z>0m,n\in\mathbb{Z}_{>0}.
Step 2 of 6: Name the square-product condition
P(m,n)=(g(m)+n)(g(n)+m)∈{12,22,32,…}P(m,n)=(g(m)+n)(g(n)+m)\in\{1^2,2^2,3^2,\ldots\}
Detailed analysis

Write the given condition as P(m,n)=(g(m)+n)(g(n)+m)P(m,n)=(g(m)+n)(g(n)+m). Every value P(m,n)P(m,n) is a positive perfect square. We will compare the parity of a prime valuation in two such products.