Associated Topics || Dr. Math Home || Search Dr. Math

### Squares in an Infinite Factorial Series

```
Date: 11/23/2001 at 10:32:31
From: Gaurav Tekriwal
Subject: Squares in an Infinite Factorial Series

How many perfect squares appear among the following numbers?

1!, 1!+2!, 1!+2!+3!,...1!+2!+3!+...n!

My approach was looking for patterns or cycles as such, but I wasn't
able to find any. Is there an interesting way to find the number of
perfect squares?

I also think that the number would tend to infinity.
Also, if we bound the sequence to a limit, say k!, then is it possible
to find the number of perfect squares?

Thanks,
GAuRAv
```

```
Date: 11/23/2001 at 11:07:25
From: Doctor Tom
Subject: Re: Squares in an Infinite Factorial Series

Hi Gaurav,

You didn't look too carefully:  1! + 2! + 3! = 1 + 2 + 6 = 9.

I'm not sure how to prove whether or not there are an infinite number,
but there's at least one.

- Doctor Tom, The Math Forum
http://mathforum.org/dr.math/
```

```
Date: 11/23/2001 at 12:42:31
From: Doctor Jubal
Subject: Re: Squares in an Infinite Factorial Series

Hi Gaurav,

The solution that Dr. Tom found, 9 = 3^2 = 1!+2!+3!, along with
1 = 1^2 = 1!, are the only solutions. Here's how you can prove this is
true.

Let's look at the next largest term in the sequence

1! + 2! + 3! + 4! = 1 + 2 + 6 + 24 = 33

Note the last digit of 33 is 3. Now, any factorial greater than
4! = 24 is divisible by 10, because they have the form 1*2*3*4*5*(more
stuff), and so are divisible by both 2 and 5. Thus, the last digit of
all factorials beginning with 5! = 120, is 0. No matter how many times
we add zero to 3, we still get 3, so the last digit in every one of
the sums of the factorials you're interested in, beginning with 33,
is 3.

However, no perfect square has 3 as its last digit. To prove this,
observe that we can write any integer as n = 10a + b, where b is the
last digit and a is the rest of the digits. Then

n^2 = (10a + b)^2 = 100a^2 + 20ab + b^2

100a^2 and 20ab both are divisible by 10 and so have zero as the last
digit, so the last digit of n^2 depends only on b^2. Thus, the last
digit of any integer squared is the same as the square of the number's
last digit.

Looking at the ten digits

0^2 =  0
1^2 =  1
2^2 =  4
3^2 =  9
4^2 = 16
5^2 = 25
6^2 = 36
7^2 = 49
8^2 = 64
9^2 = 81

None of them has 3 as the last digit of its square, so no number has
three as the last digit of its square. All the factorial sums you're
looking at that are greater than 9 end in three, so none of them can
be a perfect square.

more, or if you have any other questions.

- Doctor Jubal, The Math Forum
http://mathforum.org/dr.math/
```
Associated Topics:
High School Number Theory

Search the Dr. Math Library:

 Find items containing (put spaces between keywords):   Click only once for faster results: [ Choose "whole words" when searching for a word like age.] all keywords, in any order at least one, that exact phrase parts of words whole words

Submit your own question to Dr. Math
Math Forum Home || Math Library || Quick Reference || Math Forum Search