Find the largest value of n such that 1 ! + 2 ! + 3 ! + … + n ! is a perfect square.
This problem is shared by Adhiraj M.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Exactly what I did!
Simplest answer here! :D
Awesome!
Exactly what I did bro...
best solution
perfect answer & crisp solution
I also solved the sum just this way.
I thought of this but... something went wrong or perhaps i should change my view towards factorials. ahh! and THANKYOU
What is the sum of 1!+2!+3!+...+n!
Best solution
You can end at 4!, since 5! ends with 0
Let S n = 1 ! + 2 ! + 3 ! + … + n ! , and consider S n modulo 5 . In mod 5 , we have 1 ! ≡ 1 , 2 ! ≡ 2 , 3 ! ≡ 1 , 4 ! ≡ 4 , and n ! ≡ 0 for all other n ≥ 5 . Thus, if n ≥ 5 , then
S n ≡ 1 + 2 + 1 + 4 + 0 + 0 + … + 0 ≡ 3 ( m o d 5 ) .
Since no square is congruent to 3 ( m o d 5 ) , we must have n ≤ 4 . Testing n = 4 , 3 , 2 , 1 , we find that n = 3 is the largest working value. □
To Michael Tang : Why did you used modulo 5. What is the reason for using it..
The question demands the summation of factorials of first n natural numbers. Note that for all n ≥ 5 , its factorial have a zero at units place. Therefore, finding the summation for n = 4 may yield us some pattern or method to approach the problem as for all n ≥ 5 the units place will have same digit as that for n = 4 .
The n=4 value gives a value of 33 which means that 3 will be the units place for every greater value of n. Therefore no n ≥ 4 will be a perfect square ( no perfect square has 3 as its unit place) Therefore the answer is less than 4 which on inspection comes out to be 3.
Good approach looking at the last digit of squares.
For completeness, what are all the possible last digits of square numbers?
^ To answer that, that would be 0,1,4,5,8,9. Notice that 3 is not in the list.
It is easy to see that 1 ! + 2 ! + 3 ! = 9 , which is a perfect square as 9 = 3 2 .
Now we prove that 1 ! + 2 ! + 3 ! + . . . + n ! , with n ≥ 3 , is not a perfect square.
1 ! + 2 ! + 3 ! + 4 ! = 9 + 2 4 = 3 3 , which is obviously not a perfect square as no perfect squares end in 3 .
Now, as 5 ! = 120, any n ! with n ≥ 5 will end in 0 .
Hence, 1 ! + 2 ! + 3 ! + . . . + n ! will always end in 3 when n ≥ 5 and is not a perfect square.
Ans: n = 3 .
good
it's easy
You meant with n ≥ 4 , not n ≥ 3 .
Observe that 5! ends with a zero. 1!+2!+3!+4!=33. No further addition can change the unit's digit. No perfect square has unit-digit 3. So, 1 & 3 are the only possible choices. Larger is 3, hence 3 is answer !
awesome!!!!!!!!! I confess that I am quite taken aback by ur analysis
Note 3 ! + 2 ! + 1 ! = 9 clearly statisfies. We will prove no greater n satisfies. We see 4 ! + 3 ! + 2 ! + 1 ! = 3 doesn't satisfy. We also see 3 3 ≡ 3 ( m o d 5 ) . Additionally, for n ≥ 5 , n ! is a multiple of 5, and hence n ! ≡ 0 ( m o d 5 ) . This gives us 1 ! + 2 ! + 3 ! + ⋯ + n ! ≡ 3 ( m o d 5 ) , but 3 isn't a quadratic residue modulo 5, and hence that is never a square.
This is a pretty cool problem. If you're looking for a bigger challenge, try finding the largest n such that 1 ! + 2 ! + ⋯ + n ! = a b for some positive integers a and b and b > 1 . It is actually not that difficult, and solving this problem is the first step to that other one.
i laiks it. good job.
I made a typo, it is supposed to say 4! + 3! + 2! + 1! = 33. Sorry
Clearly n= 1 holds. Now, note that a perfect square can only end in 0, 1, 4, 5, 6 and 9.
We observe that from 5!, n! (n > = 5) will have last digit 0. So the last digit of entire sum is determined by 1! + 2! + 3! + 4! which comes out to be 3. But this definitely isn't a perfect square.
But 1! + 2! + 3! = 9 which satisfies the condition.
Hence answer is 3.
Really sorry guys.. I was wrong.. :-)
Surely thats not true.. luckily you got away with this.. :D
Log in to reply
What do u mean by that?
What do u mean dude. off course dat is true
lets assume initially that n>=5. then the required sum of factorials of the noumbers will be having 3 as the unit digit (as the unit digit of the factorial of a no. greater than 5 is 0) that can"t be a perfect square.so n is obviously less than 5. and perfect squre comes when n=3.
Since m = 0 , 1, 2, 3 or 4 mod 5 by squaring each we can see that m^2 = 0 or 1 or 4 mod 5.
If r >= 5 then r! is divisible by 5 so r! = 0 mod 5.
Then 1! + 2! + 3! + 4! + ...+n! = 1! + 2! + 3! + 4! mod 5 = 1 + 2 + 6 + 24 = 3 mod 5, which is impossible so n <= 3 and 1 + 2! + 3! = 9 a square, so n = 3.
Let n greater than or equal to 4, the sum's last digit will be 3 and a number with last digit as 3 cannot be a square. Now we have to check for n less than or equal to 3. At 3 the sum is equal to 9 which is a square. Hence, n= 3. Note: last digit will be constant after n greater than or equal to 4 as the the numbers after 4! have 0 as their last digit.
All sums for n >3 end up with 3 as the last digit and thus cannot be perfect squares
Note that for n ≥ 4 , the expression ends with 3 , and there are no perfect squares ending with 3 . So, evaluating the first 3 , we have n = 1 or n = 3 . As we're looking for the greater, then n = 3 .
1!=1,2!=2,3!=6,4!=24,5!=120,6!=720,7!=5040........... 1+2+6+24=33.......
from now if you add 33 to 120 i.e., 5!.....33+120 =153
if you add 153 to 720...............................153+720 =873
if you add 873 to 5040.............................873+5040=5913
if you observe all the results have 3 at its units place......a perfect square does not have a 3 in its units place..... so there is no possibility of answer if we go forward....so come back
1+2+6+24=33
1+2+6=9 and this is the largest perfect square in series....
Finding the Factorial and expanding we have 1!=1 2!=2 3!=6 4!=4 5!=120 and so on Therefore after 4! adding the factorial produces unit digit 3 in the number.A number cannot be a perfect square if it contains 2,3,7 and 8 in units digit.Hence the required answer is 1!+2!+3!=9
for n> 3 , unit digit of sum of factorials is always 3 , like 1! +2! +3! +4! = 33 , so only possible perfect square is 1! +2! +3! = 9. A perfect square is possible only when the unit digit is either 1,4,5,6 ,9 or 0.
k^2 = 1, 4, 5,6,9,0 mod 10 for all k integer. but for each N bigger than 3 it's obvious that S= 1+2!+3! +...+n! = 3 mod 10 cases n=1,2,3: n=1: S=1 n=2: S=7 n=3: 1+2!+3! =9 the largest value of n such S is a perfect square is n=3.
for n=1 then 1! = 1 is a perfect square for n=2 then 1! + 2! = 3 is not a perfect square for n=3 then 1! + 2! + 3! = 9 is a perfect square for n=4 then 1! + 2! + 3! + 4! = 33 is not a perfect square we see that for n>= 5 then 1 ! + 2 ! + . . . + n ! ≡ 1 ! + 2 ! + 3 ! + 4 ! ≡ 3 ( m o d 5 ) since for k>=5 then 5|k! but we know that every perfect squares is never congruent 3 mod 5. So the largest value of n is 3
I think that only 1! + 2! + 3! that have perfect square number. So, 1! + 2! + 3! = 1 + 2 + 6 = 9 (3^2). Then, the answer is 3.
Modular Arithmetic The key to this problem was finding the right number to take mod of. I tried 4 and 8 but they didn't work. When you have finished reading solution go back and check why. So: All squares are congruent to either 0 , 1 or − 1 m o d 5 1!=1 mod 5 2!=2 3!=6=1 4!=24=-1 5!=0 6!=0 . . . The rest will also be 0 mod 5 since there will always be the factor of 5 there.
1!=1 and 1!+2!+3!=9 work upon checking. Now proving that 9 is the highest.
9=-1 mod 5
9+4!=-1-1=-2mod5 We just showed that n!=0mod 5 for n>4 So if we choose to go past 4! the sum will still be -2mod5
But no squares exist that are congruent to -2 mod5.
And so 9 is the highest square and this occurs when n = 3
Sorry no latex using my phone and it's just too long
One can easily observe that 5 ! + 6 ! + 7 ! . . . . + n ! is divisible by 5,for n ≥ 5 . 1 ! + 2 ! + 3 ! + 4 ! = 3 3 ≡ 3 ( m o d 5 ) . 1 ! + 2 ! + 3 ! + . . . . . + n ! ≡ 3 ( m o d 5 ) . But every integer is ≡ 0 , 1 , 4 ( m o d 5 ) .Which shows that n < 5 .So n=3 works.
Note that perfect squares are always ≡ 1 , 2 , 9 , 6 , 5 , 6 , 9 , 4 , 1 , 0 ( m o d 1 0 )
(I bashed this since it's not TOO bad).
Also, note that after 5 ! , the units digit of any number factorial is zero, thus the units digit of the SUM of the first n factorials (where n ≥ 5 of course), will always be 1 + 2 + 6 + 4 = 3 . (these numbers came from the units digit of the first four factorial numbers).
Checking the list, we see that 3 is NOT one of the residues for perfect squares mod 10. This means that we only need to check up to 4!, and we easily see the greatest value of n is 3 , which generates 1 ! + 2 ! + 3 ! ⟹ 1 + 2 + 6 = 9 , which is a perfect square.
1! + 2! +3! = 9 1! + 2! +3! +4! =33 and r! ends with 0 for r>4 so the sum 1! + 2! +3! +4! +5! +......... will end with 3 which cannot be a square
1+2+3=6+3=9 Nine is a perfect square because 3*3=9 A perfect square is a number that can be expressed as the product of two equal integers.
This solution needs to further show that 3 is the largest number satisfying the conditions. That is not immediately obvious.
5! last digt =0 so n=4 or 3 1!+2!+3! =9 and 1!+2!+3!+4! = 33 so n = 3
If we examine the sum for some small n's, we will soon see that every value of n beginning with n = 4 will result in a sum ending in 3 because every factorial higher than 5 will end in a zero because it contains both a factor of 2 and a factor of 5. There are no perfect squares that end in the number 3, and therefore no sum that ends in 3 can be a perfect square. This means that n must be equal to 3.
Problem Loading...
Note Loading...
Set Loading...
All perfect square doesn't end with 3 . (You can prove this by listing out all the squares of integers from 0 to 9 ).
1 ! = 1 1 ! + 2 ! = 3 1 ! + 2 ! + 3 ! = 9 1 ! + 2 ! + 3 ! + 4 ! = 3 3 1 ! + 2 ! + 3 ! + 4 ! + 5 ! = 1 5 3
Note that since x ! , where x ≥ 5 , is a multiple of 1 0 , it will have unit digit 0 . Hence, all sums of factorial including x ! ( x ≥ 5 ) will have a unit digit of 3 . Hence, all of these factorial sums (with unit digit 3 cannot be a perfect square). Thus, the largest n whereby 1 ! + 2 ! + … + n ! is a perfect square is 3