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

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.

• Think modulo $5$. – Lord Shark the Unknown Mar 12 '18 at 11:26
• This seems like a cool question. Not sure why it's attracting downvotes (except that attitudes on this site aren't always very good.) – goblin Mar 12 '18 at 11:27
• 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. – vrugtehagel Mar 12 '18 at 11:28
• And please, downvoters, if you DO decide to downvote a question: explain WHY in the comments so the OP can improve! – vrugtehagel Mar 12 '18 at 11:34
• @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 – Von Neumann Mar 12 '18 at 11:50

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$.
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$.