In my latest number theory assignment, there was a recurrence relation defined by

Letting we can manipulate the recurrence relation to solve for and then solve back for . The result is that

So it is pretty neat fact that sum of first n factorials satisfies reasonably simple recurrence relation. Now, let’s take a look at few values of .

One might ask what interesting properties these numbers might have. Probably lots!

Observe that and are perfect squares. For what other values of the number is perfect square? It turns out that these are the only ones, and in particular is not perfect square for every . Proving this is actually easier than it sounds. When I first saw this problem, I tried to show that is strictly between two consecutive squares (which, by the way, is very useful trick in problems like this), but that didn’t go too well. There is much easier approach, as outlined below.

Let’s take a look at the last digit of . It appears that ends with digit for . How can we prove this? Well, we know ends with , (namely ). But now observe that for , the term will end with , because product will contain both and . Hence, for ,

which therefore ends with digit . It is easy to check that no perfect square can end with digit (namely by checking all squares mod ). This shows that is not perfect square for . Indeed, the solution didn’t require anything higher than basic high school math!

As a bonus, the reader of this blog can try figuring it out when the sum of first factorials is perfect integer power.

### Like this:

Like Loading...

*Related*

Thanks a lot mate. Keep it up. Best wishes from homeland, Azerbaijan.

Hi Huseyn,

Thanks for the comment. I did not forget that we went to the same high school! 🙂

Great proof! What about a cube?