Find all of positive integers $k, m, n$ such that $$T := \frac{2kmn(m^2 - n^2)}{m^2 +n^2} \in \mathbb{Z} .$$
For example, if $(m^2 +n^2) \mid k$ then $T \in \mathbb{Z}$ but I can't find a formula of $k, m, n$. The question is that "is there a generating form of $k, m, n$?"
Thank you very much for your ideas.
Let $\gcd(m,n)=d$ and put $m=dx,\ n=dy$ so that $x,y$ are now coprime. [We will assume that $x>y.$]
Replacing $m,n$ by $dx,dy$ in $T$ gives $$T=\frac{d^2k\cdot 2xy\cdot(x^2-y^2)}{x^2+y^2}.\tag{1}$$ Now if $x,y$ are of opposite parity, the triple $(2xy, x^2-y^2,x^2+y^2)$ is a primitive Pythagorean triple. This means that the denominator of (1) is coprime with the second and third factors in the numerator of (1), and thus $T$ is an integer iff $x^2+y^2$ divides $d^2k.$
The remaining case is when $x,y$ are each odd. Here looking mod 4 one sees that $(x^2+y^2)/2$ is odd, and it is easily shown that if $T$ is now written as $$T=\frac{d^2k\cdot xy\cdot(x^2-y^2)}{(x^2+y^2)/2}.\tag{2}$$ then the denominator is coprime with the second and third factors in the numerator, so that $T$ is an integer in this case iff $(x^2+y^2)/2$ divides $d^2k.$