All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Summing consecutive factorials (Posted on 2018-06-26)
1!=1^2; 1!+2!+3!=3^2
Are there any other sums of n consecutive factorials that sum up to a perfect square?

Either list them all or prove there are none.

 No Solution Yet Submitted by Ady TZIDON No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 re(5): If you don't have to start with 1 ... Comment 7 of 7 |

After further review, looking mod 7 does work, I just made a miscalculation in the remainder of the partial sum from 0 to 6.

0!+1!+...+6!=874=6 mod 7

the possible remainders for squares mod 7 is [0,1,2,4] and thus no further solutions are possible.

To redeem myself I ran this python code to try and find a base that works because I had assume 7 would fail

import math

s=0
for x in range(10):
s=s+math.factorial(x)
if x>2:
b=x+1
r=s%b
rems=[(y*y)%b for y in range(b)]
if r not in rems:
print([x,s,b,r,rems])

What is interesting is that it showed 4 is also a valid base where the only possible remainders for squares are 0 and 1 and the sum 0!+1!+2!+3!=10=2 mod 4.

 Posted by Daniel on 2018-06-26 20:36:47

 Search: Search body:
Forums (0)