SOLUTION: Find the last two digits of (1! + 2! + 3! + ... + 2024!)^2024

Algebra ->  Sequences-and-series -> SOLUTION: Find the last two digits of (1! + 2! + 3! + ... + 2024!)^2024      Log On


   



Question 1208205: Find the last two digits of (1! + 2! + 3! + ... + 2024!)^2024
Answer by ikleyn(52788) About Me  (Show Source):
You can put this solution on YOUR website!
.
Find the last two digits of (1! + 2! + 3! + ... + 2024!)^2024
~~~~~~~~~~~~~~~~

First idea is that we need to know the last two digits of the sum of factorials:
only last two digits of this sum will determine the answer after taking the degree.


 1! =       1

 2! =       2

 3! =       6

 4! =      24

 5! =     120

 6! =     720

 7! =    5040

 8! =   40320

 9! =  362880

10! = 3628800


At this point, we may stop calculating factorials, because, OBVIOUSLY, all the following factorials will have
at least two ending zeroes, so they do not make influence to the last two digits of the sum of factorials.


The sum  1! + 2! + 3! + ... + 10!  is  4037913,  and the last two digits of this sum are "13".


Hence, the last two digits of the sum  1! + 2! + 3! + ... + 2024!  are  "13",  too.



Now our task is to find the last two digits of  13%5E2024.


Below is the table of the last two digits of the terms  13%5Ek,  from 1 to 21  (k = 1, 2, 3, . . . , 21).
I calculated this table using Excel recursive formula  r%5B1%5D = 13,  r%5Bn%2B1%5D = MOD%2813%2Ar%5Bn%5D%2C100%29.


This formula returns the two last digits of the terms  13%5Ek and does not perform other unnecessary calculations; 
it also maintains the participating numbers as short as needed, so there is no overflow.


   1            13
   2		69
   3		97
   4		61    <<<---===
   5		93
   6		9
   7		17
   8		21
   9		73
  10		49
  11		37
  12		81
  13		53
  14		89
  15		57
  16		41
  17		33
  18		29
  19		77
  20		1
  21		13


I know for sure, that the sequence of last two digits is cyclic.
My task is to determine the parameters of this cycle: its first term and its length.


    How do I know that this sequence is cyclic ? - Because there are only 100 (or 99, in this case) possible
    remainders of two digits, and inevitably they begin repeating. As soon as they start repeating, we will see the cycle.


From the table, you see that the 21-th value 13 repeats the first value 13.  
It means that the sequence of the last two digits is cyclic with the period of 21-1 = 20.


Then the number of full periods till the 2024 term is  2024 : 20 = something + remainder.

We do not need to know the value of this "something", but only need to know the remainder, which is, obviously, 4.


It means that the last two digits of  13%5E2024  are the 4-th term of the cycle in the table above, i.e. 61.


ANSWER.  The last two digits of the number  (1! + 2! + 3! + ... + 2024!)^2024  are "61".

Solved.

---------------------

This problem is intended for a Math circle/Math school advanced students.

So I leave some obvious details of the solution without explanations, hoping that
the student is adequate to the problem and knows simple truths, that every such student must know.


If you want to see other similar solved problems of this kind, look into the lessons
    - What is the last digit of the number a^n ?
    - Find the last three digits of these numbers
    - Find the last two digits of the number 3^123 + 7^123 + 9^123
in this site.

They are intended to provide basics for you and to make your horizon wider.