Suppose $k$ and $l$ are relatively prime positive integers. What is $gcd(k^2 + l^2, k + l)$?
I will represent the gcd with $d$. I know $d|k^2+l^2$ and $d|k+l$. Hence, $dm = k^2 + l^2$ and $dn=k+l$ for some integers $m$ and $n$. If I solve the second equation for $k$, and substitute this into the first equation...with some rearranging, I get $d(md - n^2d+2nl)=2l^2$. Therefore, $d|2l^2$. Howevever, I know that I need to use the fact also that $gcd(k, l)=1$ in some way, and I think I probably need to somehow use this to show that $d|2$ in the end, but I'm not sure where to go.
Hint: you proved $d|2l^2$ and in the same way you can prove $d|2k^2$, so $d|\gcd(2k^2,2l^2)=2\gcd(k^2,l^2)=2$
Then it's easy to use an odd/even argument to show that $\gcd$ is $2$ is $l$ and $k$ are both odd
or even(cannot be both even, as they are relatively prime), and $1$ otherwise.EDIT: To show $d|2l^2$ in a cleaner way:
$d|k+l$ so $d|(k+l)^2=k^2+l^2+2kl$, so $d|2kl$
then: $d|k+l$ so $d|2kl+2l^2$ (multiplied by $2l$) so $d|2l^2$
and: $d|k+l$ so $d|2k^2+2kl$ (multiplied by $2k$) so $d|2k^2$