M5. For which integers $n$ is $\frac{16\left(n^{2}-n-1\right)^{2}}{2 n-1}$ also an integer?
Solution
We set $m=2 n-1$, so $n=\frac{1}{2}(m+1)$. Now the expression becomes
$$
\begin{aligned}
\frac{16}{m}\left[\left(\frac{m+1}{2}\right)^{2}-\left(\frac{m+1}{2}\right)-1\right]^{2} & =\frac{1}{m}\left[(m+1)^{2}-2(m+1)-4\right]^{2} \\
& =\frac{1}{m}\left[m^{2}-5\right]^{2}=\frac{m^{4}-10 m^{2}+25}{m} .
\end{aligned}
$$

This is an integer if, and only if, $m$ is a factor of 25 . Hence the values of $m$ are $\pm 1, \pm 5, \pm 25$ and the corresponding values of $n$ are $-12,-2,0,1,3$ and 13 .

Instead of using the substitution, the numerator can be rewritten as $\left((2 n-1)^{2}-5\right)^{2}$ to obtain the same result.