# Can the sum of the first $p$ factorials ever be a perfect power for $\ p>3\$?

Has $$\sum_{j=1}^p j!=q^r$$ , where q,p,r are positive integers, and r > 1 , a solution ?

I solved partially, if r is even, then RHS is a perfect square, and there is no doubt in that. Therefore, the left side must be a perfect square as well. But for p>3, the last digit of LHS is 3 which is not the last digit of any square. Hence, p<4, and hence manually checking, only solutions are p =1,3. But i cannot generalize when r is odd. Any solution to the next part would be helpful!

Let $$S(p)=\sum_{j=1}^pj!$$ denote your sum.

Claim: For $$p≥8$$ $$v_3(S(p))=2$$

(Here, as usual, for a prime $$q$$ and natural number $$n$$, $$v_q(n)$$ denotes the order to which $$q$$ divides $$n$$. Thus, $$v_3(18)=2$$ for example.).

Pf: One computes that $$S(8)=3^2\times 11\times 467$$ and from there after you have at least three factors of $$3$$ in each summand.

It follows immediately that, at least for $$p≥8$$ your sum could not be any power of degree greater than $$2$$. As you have already addressed the case of squares, we are done (after a simple search for small $$p$$).

• You answered despite of the demanding style ? – Peter Jan 19 at 14:43
• @Peter I didn't look at the comments, you are right about the tone. – lulu Jan 19 at 14:44
• @lulu I think users should not be encouraged to get answers this way. So, my suggestion is to delete the answer , although it is a very nice answer. – Peter Jan 19 at 14:50
• @Peter I'm on the fence. The question itself is very well posed, I thought. The OP addresses a major subcase of the problem. The tone of the comments is bad, and had I read them I would have stopped thinking about the problem. As it is, I think the question is mathematically interesting so I'm going to leave the solution up, though I do think you have a point. – lulu Jan 19 at 15:22
• @lulu I think you are right, and the elegant solution is surely useful also for other users. – Peter Jan 19 at 15:23