Determine all positive integers $k$ and $n$ that satisfy the equation

$$
k^{2}-2016=3^{n}
$$

(Stephan Wagner)
We consider the equation modulo 3 first: Since 2016 is divisible by 3 and $3^{n}$ is as well, $k^{2}$ and thus $k$ must also be a multiple of 3. Therefore, $k^{2}$ is divisible by 9, and since this also holds for 2016, $n \geq 2$ must hold for $3^{n}$ to be divisible by 9. Now we can divide by 9:

$$
(k / 3)^{2}-224=3^{n-2} .
$$

Now $224 \equiv 2 \bmod 3$, and $(k / 3)^{2}$ is either 0 or 1 modulo 3. Therefore, $3^{n-2}$ is not divisible by 3, which is only possible for $n=2$. The only solution $n=2, k=45$ follows immediately.

(Stephan Wagner)