If $1!+2!+\dots+x!$ is a perfect square, then the number of possible values of $x$ is?

I looked for a general way of expanding such a factorial series but I was not able to find one, without that I don't know any other way to approach this problem.

All help is appreciated.

  • 3
    $\begingroup$ Think modulo $5$. $\endgroup$ Mar 12, 2018 at 11:26
  • 1
    $\begingroup$ This seems like a cool question. Not sure why it's attracting downvotes (except that attitudes on this site aren't always very good.) $\endgroup$ Mar 12, 2018 at 11:27
  • $\begingroup$ I don't think people think there's anything wrong with the question, just the way it's being presented. For example, the actual question isn't even in the body, only in the title. $\endgroup$ Mar 12, 2018 at 11:28
  • 2
    $\begingroup$ And please, downvoters, if you DO decide to downvote a question: explain WHY in the comments so the OP can improve! $\endgroup$ Mar 12, 2018 at 11:34
  • 1
    $\begingroup$ @goblin I perfectly do agree. There are LOTS of questions that are really interesting. Maybe the are not really difficult or "brain teasing", but who cares? Down votes here appear to be VERY arbitrary. People down vote sometimes just because they find the question boring, useless or "too easy". I'm in accord to say that some questions are, but I NEVER down voted a question though. Why? Because when I (like other people) ask a question it's because I am interested in other people's way to reason, in the answer and in acquiring knowledge / methods. Down votes are stupid. Expect for wrong answers $\endgroup$
    – Laplacian
    Mar 12, 2018 at 11:50

1 Answer 1



Let $$a_n = \sum_{j=1}^nj!$$

Knowing that for $j\ge 5$, the term $j!$ will end with $0$, since the product will contain both $2$ and $5$ it should be straighfroward for you to show that $$a_n = 33 + \sum_{j=5}^n j!$$

This sum therefore ends with digit $3$.

Big Hint

It is easy to check that no perfect square can end with digit $3$ (namely by checking all squares $\mod 10$). This shows that $a_n$ is not perfect square for $n\ge 4$.


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.