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 6 of 6: Conclude the complete solution
g(k+1)−g(k)=1 for all kg(k+1)-g(k)=1\text{ for all }k
Detailed analysis

Summing g(k+1)−g(k)=1g(k+1)-g(k)=1 from k=1k=1 to k=n−1k=n-1 gives g(n)=g(1)+n−1=n+cg(n)=g(1)+n-1=n+c, where c=g(1)−1≥0c=g(1)-1\ge0. Step 1 verified that every such function works, so these and only these are the solutions. ■\blacksquare