Can Factorials Add Up to a Square?

"Physics & Astronomy"
21 followers
Hello everyone. In this video, we're going to be solving a Diophantine equation.
What does that mean? It means we're solving for integers.
Particularly, we're looking for non-negative integers because we have a sum of factorials.
We have 1 factorial plus 2 factorial plus dot dot dot all the way up to x factorial,
which is the largest number in our sum, and that equals y squared.
So we have factorials on one side and squares on the other side.
Who's going to win or they're going to tie?
So to be able to solve this problem, first of all,
notice that we're looking for integer solutions, non-negative integers.
You need a non-standard method because it's not like a polynomial equation
or an exponential equation where you have a clear cut method.
We kind of need to think a little outside the box.
If you don't have any ideas, you can just go ahead and test some values.
Of course, at the end, you need to conclude these are all the solutions
or you have to say there are maybe infinitely many solutions.
So let's go ahead and take a look.
Now, we assume that x is going to be at least 1 in this case
because if x is 1, then we only have 1 term in this sum,
which 2 factorial is not even going to be there,
and 1 factorial will equal y squared.
So we can start with that.
If x is equal to 2, then we're going to stop at 2 factorial.
If x is 3, we're going to stop at 3 factorial.
You get the idea?
The highest term in the sum is x factorial.
Great.
So let's go ahead and take a look at how we can solve a problem like this.
Like I said earlier, if you don't have any ideas,
go ahead and test some values.
What would you start with, right?
Well, you can start with x, first of all, because x is on the left-hand side
and the sum is determined by x.
Even though you want it to be a perfect square, let's start with x.
For example, if x is equal to 1,
then what happens is we only have 1 factorial in the sum.
We get something like 1 factorial equals y squared.
What is that supposed to mean?
Well, 1 factorial, as you should know, is 1.
So y squared equals 1, and this means two things.
y is either 1 or negative 1.
But I told you that we were going to focus on non-negative integers.
We're not going to accept the negative 1,
even though it should be okay,
because when you square negative 1, you get a positive answer.
But let's just go ahead and get rid of that.
Okay?
So this means if x equals 1, then y equals 1.
So 1 comma 1 is a valid solution.
But the million-dollar question is,
is that the only solution?
We need to find out.
So let's go ahead and test the second-largest value,
which is x equals 2.
If x is equal to 2, then we get 1 factorial plus 2 factorial equals y squared.
And as you should know, by the way,
0 factorial is not included here,
but 0 factorial is equal to 1 as well.
Some people say, like, how can this be 1?
Well, think about it.
You are arranging nothing,
and that can be done in one way.
We just don't do it, right?
So 1 factorial plus 2 factorial is equal to 3.
Uh-oh.
There is no integer whose square equals 3.
Too bad.
Which means we don't get a y value.
But x and y both have to be non-negative integers.
What does that mean?
It means there are no solutions for x equals 2.
Does that make sense?
I hope it does.
Now let's go ahead and test the next value,
which is x is equal to 3.
Now if x is equal to 3,
then we get 1 factorial plus 2 factorial plus 3 factorial,
and we have to stop at 3 factorial,
because that's x,
and this should equal y squared.
Well, this is 1, this is 2, and this is 6.
Guess what that sum is?
9.
Great! If y squared is equal to 9,
then we get a solution.
Well, actually, we get two solutions,
but we're only going to take the positive one.
y equals 3 and y equals negative 3.
For obvious reasons,
negative 3 does not count.
So for x equals 3, y equals 3.
Wow, that's interesting.
First, we get 1, 1.
Now we get 3, 3.
Does that mean 5, 5 is going to be a solution?
Don't worry, we'll get there.
But one thing to keep in mind is,
even numbers did not work.
Do you think x equals 4 is going to work?
What are your thoughts?
Let's go ahead and give it a try.
And don't worry, I'm not going to keep doing this.
This is not going to go on forever.
We're going to stop at some point.
But we have to stop somewhere meaningful.
Because you can't just stop and say,
hey, you know what, this is it.
You have to have proof.
So if x equals 4,
again, remember our sum is 1 factorial,
2 factorial, 3 factorial,
and 4 factorial equals y squared.
Because we don't know y yet.
But we know that 1 plus 2 plus 6 plus 24.
We know that this is 9.
9 plus 24 is 33.
This means y squared is 33.
Uh oh, Houston, we have a problem.
But we don't have a solution.
So we're going to reject this as well.
Why?
Because no perfect square can be 33.
So that means for x equals 4,
there are no solutions.
Which again, justifies that
x cannot be even.
But is that going to be true for all even values?
Let's go ahead and check it out.
Now the next thing I'm going to check is
x equals 5.
And let me tell you we're almost done with this.
So just hang in there.
If x is 5,
we get 1 factorial plus 2 factorial
plus 3 factorial plus 4 factorial
plus 5 factorial.
Hopefully you have this much patience.
One thing to keep in mind.
We already know this is 33.
And this is equal to 120.
So you don't have to reinvent the wheel, right?
So y squared equals 153.
Houston, we have a problem.
But that's a bigger problem.
You know why?
Because not only there's no integer
whose square is 153,
there are actually...
Are you ready for the truth?
There are no perfect squares
that end in 3.
There are no perfect squares
that end in 7.
Think about it.
Why can't that be happening?
Think about all the squares.
1 squared is 1, 2 squared is 4,
3 squared is 9,
4 squared is 16,
5 squared is 25,
6 squared is 36,
7 squared is 49,
8 squared is 64,
and 9 squared is 81,
and of course 10 squared is 100.
So a perfect square
can end in 0, 1,
4, 9, 6, and 5.
But those are the only numbers
that can end in.
So it can end in 2, it can end in 3,
it can end in 7.
Can it end in 8? Nope.
Those are all the exceptions.
So you cannot have a perfect square
which ends in 3,
and we already know 153 is not...
But why do I keep saying
it can't end in 3?
Why is the ending so important?
We're kind of approaching the ending, right?
But the ending is also important
because starting with 5 factorial,
and this is very important
because obviously you're not going to
add infinitely many numbers, are you?
You'll never have enough time, right?
You'll run out of time,
and you know what's going to happen at the end.
We don't need to say it.
But all the numbers starting with 5 factorial,
they're going to end in 0.
So when you add zeros,
it's not going to change the last digit.
So any factorial sum
starting with 5 factorial in the sum
and anything higher,
they'll always end in 3.
So this sum, 1 factorial through 6 factorial,
last digit is 3 again.
You don't need to evaluate it.
I mean, you can if you want,
but there's no point.
So this is not going to work.
But why doesn't any perfect square
end in 3?
It's a little bit of modular arithmetic
if you kind of look into it,
which means for x greater than or equal to 5,
no solutions,
which is a good thing
because we can stop here
and just look at what we have.
We have a solution for x equals 1,
and that is y equals 1.
We have a solution for x equals 3,
and that is y equals 3.
And guess what?
Those are the only solutions.
Are there any other solutions?
I don't think so.
If you can find one,
let us know in the comment section down below.
And this brings us to the end of this video.
Thanks for watching.
I hope you enjoyed it.
Please let me know.
Don't forget to comment, like and subscribe.
I'll see you next time with another video.
Until then, be safe, take care,
and don't forget to check out
Cybermath and A++BI.
Bye-bye.
