Let $p(m, n)$ be the polynomial $2 m^{2}-6 m n+5 n^{2}$. The range of $p$ is the set of all integers $k$ such that $k=p(m, n)$ for some integers $m$, $n$. Find which members of $\{1,2, \ldots, 100\}$ are in the range of $p$. Show that if $h$ and $k$ are in the range of $p$, then so is $h k$.

## Answer

1,2,4,5,8,9,10,13,16,17,18, 20,25,26,29,32,34,36,37, 40,41,45,49,50,52,53,58, 61,64,65,68,72,73,74,80,81,82,85,89,90,97,98,100
We have $p(m, n)=(m-2 n)^{2}+(m-n)^{2}$, so $p(2 a-b, a-b)=a^{2}+b^{2}$. Hence the range of $p$ is just the sums of two squares.

$\left(a^{2}+b^{2}\right)\left(c^{2}+d^{2}\right)=(a c-b d)^{2}+(a d+b c)^{2}$, which establishes that if $h$ and $k$ are in the range, then so is $hk$.