2. Determine all integer values of $n$ for which $n^{2}+6 n+24$ is a perfect square.
Solution: Suppose $n^{2}+6 n+24=a^{2}$. We can write this as $(n+3)^{2}+15=a^{2}$. Letting $x=n+3$ we can rewrite the above equation as $a^{2}-x^{2}=15$, which we can factor as $(a-x)(a+x)=15$. Without loss of generality we may assume that $a$ is positive, since we get the same values of $x$ no matter whether we use the positive or negative $a$ value. Since $a$ is positive, at least one of $a+x, a-x$ is also positive. Since the product of $a+x$ and $a-x$ is positive, this means that both must therefore be positive. This gives us that $(a+x, a-x) \in\{(1,15),(3,5),(5,3),(15,1)\}$. These give solutions for $(a, x)$ of $(8,7),(4,1),(4,-1),(8,-7)$. The corresponding $n$ values for these are $4,-2,-4,-10$.