Square Factorial Quest


$n$ is a positive integer such that $2019+n!$ is a square number. Find all such values of $n$.

Here, $ n!=n\times (n-1)\times ...\times2 \times 1.$ For example, $4!= 4\times 3\times2\times \times1 = 24.$


Source: BdMO 2019 National Junior P4


Proof Based Problems  


  4 Upvotes                    0 Downvotes


Solution

Disclaimer: The solutions we've shared are just one exciting approach, and there are surely many other wonderful methods out there. We’d love to hear your alternative solutions in the community thread below, so let's keep the creativity flowing!

This problem takes a good understanding on Modular Arithmetic

Let's assume $n \geq 4$


As $n!$ contains $4$ so $4|n!$

in other words, $n! \equiv 0 \pmod{4}$


Now, we assume $2019+n!=k^2$ where $k$ is a natural number.

So $k^2 \equiv 2019+n! \equiv 3+0 \equiv 3 \pmod{4}$

But $k \equiv 0,1,2,3 \pmod{4}$

So, $k^2 \equiv 0,1 \pmod{4}$

But we see $k^2 \equiv 3 \pmod{4}$

Contradiction!

So, $n<4$


Plugging value of $n$ from $1$ to $3$ we see for $n=3$, $2019+n!$ is a perfect square.

So, $n=3$.

This is a proof based problem added for learning purposes and does not accept submissions.

You can view the solution by clicking on the solution tab.

Editorial



Need a hint? Checkout the editorial.

View Editorial