1
$\begingroup$

Find the values of $n≥1$ for which

$$n!+(n+1)!+(n+2)!$$ is a perfect square.

This problem is from the book ELEMENTARY NUMBER THEORY by DAVID M BURTON under the chapter Primes and their distribution.Here is the link: https://books.google.com/books/about/Elementary_Number_Theory.html?id=2dI3AwAAQBAJ

Any hints of how to solve it are welcome.

$\endgroup$
  • $\begingroup$ $n=1$ works! ${}{}{}{}{}{}$ $\endgroup$ – mjw Feb 17 at 4:15
  • $\begingroup$ Is there any scope of improvement in my post? Feel free to outline them $\endgroup$ – Jordan Lawson Feb 17 at 4:15
  • $\begingroup$ @mjw The problem requires solutions other than 1 $\endgroup$ – Jordan Lawson Feb 17 at 4:17
  • $\begingroup$ Seems that $n=1$ is the only solution. $\endgroup$ – mjw Feb 17 at 4:28
3
$\begingroup$

You have

$$\begin{equation}\begin{aligned} n! + (n+1)! + (n+2)! & = (n!)(1 + (n+1) + (n+1)(n+2)) \\ & = (n!)(n + 2 + (n^2 + 3n + 2)) \\ & = (n!)(n^2 + 4n + 4) \\ & = (n!)(n + 2)^2 \end{aligned}\end{equation}\tag{1}\label{eq1A}$$

Also, Bertrand's postulate states that for any $m \gt 3$, there's a prime number $p$ such that

$$m \lt p \lt 2m - 2 \tag{2}\label{eq2A}$$

If $n \ge 6$ in \eqref{eq1A} is even, there's an $m \gt 3$ such that $n = 2m - 2$ so then $n + 2 = 2m$. From \eqref{eq2A}, there's a prime $p \gt m$, but $p \lt 2m - 2$, so it's a factor in \eqref{eq1A}. However, you also have that $2p \gt 2m$ and, as such, there's only one factor of it in \eqref{eq1A}. This means that \eqref{eq1A} can't be a perfect square.

If $n \ge 7$ in \eqref{eq1A} is odd, there's an $m \gt 3$ such that $n = 2m - 1$ so then $n + 2 = 2m + 1$. As before, there's a prime $p \gt m$, but $p \lt 2m - 1$, so it's a factor in \eqref{eq1A}. However, $2p \ge 2m + 2$, so also as before, there's only one factor in \eqref{eq1A}, meaning it can't be a perfect square.

This just leaves checking for $1 \le n \le 5$, which give $9$, $32$, $150$, $864$ and $5880$, respectively. Thus, as mjw's comment says, $n = 1$ is the only solution as $9 = 3^2$.

Update: As you stated in the comment below, the solution above could've been a bit simpler & shorter since, in \eqref{eq1A}, as $(n+2)^2$ is already a square, it only needed to check for $n!$ being a perfect square.

$\endgroup$
  • 2
    $\begingroup$ Very nice!${}{}{}{}{}{}$ $\endgroup$ – mjw Feb 17 at 4:33
  • $\begingroup$ @mjw Thanks. I made a small mistake originally, which I've fixed. Also, out of curiosity, I wanted to check on the other possibilities myself, so I finished the rest of the answer at the same time. $\endgroup$ – John Omielan Feb 17 at 4:40
  • 1
    $\begingroup$ I believe you could have just used the fact that $n!$ cannot be a perfect square $\endgroup$ – Jordan Lawson Feb 17 at 5:10
  • $\begingroup$ @HowardDickson You're right. That would have made the answer a bit shorter and simpler. $\endgroup$ – John Omielan Feb 17 at 5:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.