Divisibility number theory problem

94 Views Asked by At

How many $k,m$ exist such that $ \frac {k^2+m^2}{2(k-m)}$ is also an integer.

$k,m \in \mathbb {Z} ^ + $

My guess that there is finitely many solutions but I can't seem to be able to prove so.

3

There are 3 best solutions below

0
On

Let $k=6s, m=2s$ with $s\in\mathbb{Z}^+$. then $$ \frac{k^2+m^2}{2(k-m)}=\frac{36s^2+4s^2}{8s}=5s\in\mathbb{Z}^+ $$

1
On

If $\frac{k^2+m^2}{2(k-m)}$ is an integer, we need $k\equiv m \pmod{2}$, or the numerator would be odd. Then

$$\frac{k^2+m^2}{2(k-m)} = \frac{k^2-m^2}{2(k-m)} + \frac{2m^2}{2(k-m)} = \frac{k+m}{2} + \frac{m^2}{k-m}$$

is an integer if and only if $\frac{m^2}{k-m}\in\mathbb{Z}$. Let $d \equiv m \pmod{2}$ a divisor of $m^2$, and set $k = m+d$.

0
On

Let $k^2+m^2=2p(k-m)\text{ ,where }p\in{\Bbb{N}}$

$$k^2-2pk+m^2-2pm=0$$ $$(k-p)^2+(m+p)^2=2p^2=(\sqrt{2}p)^2$$

Notice that there always exist a pair of $(k,m)=(2p,-2p)$ lying on a circle centred at $(p,-p)$ with radius $=\sqrt{2}p$.