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

Algebra ->  Divisibility and Prime Numbers -> Lesson Find the last two digits of (1! + 2! + 3! + ... + 2024!)^2024      Log On


   


This Lesson (Find the last two digits of (1! + 2! + 3! + ... + 2024!)^2024) was created by by ikleyn(52781) About Me : View Source, Show
About ikleyn:

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

Problem 1

Find the last two digits of   %281%21+%2B+2%21+%2B+3%21+%2B+ellipsis+%2B+2024%21%29%5E2024.

Solution

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".


My other lessons in this site on miscellaneous problems on divisibility of integer numbers are
    - Light flashes on a Christmas tree and a Least Common Multiple
    - The number that leaves a remainder 1 when divided by 2, by 3, by 4, by 5 and so on until 9
    - The number which gives remainder 4 when divided by 7, remainder 5 when divided by 8 and remainder 6 when divided by 9
    - Introductory problems on divisibility of integer numbers
    - Finding Greatest Common Divisor of integer numbers
    - Relatively prime numbers help to solve the problem
    - Solving equations in integer numbers
    - Quadratic polynomial with odd integer coefficients can not have a rational root
    - Proving an equation has no integer solutions
    - Composite number of the form (4n+3) must have a prime divisor of the form (4n+3)
    - Problems on divisors of a given number
    - How many three-digit numbers are multiples of both 5 and 7?
    - How many 3-digit numbers are not divisible by 2; not divisible by 3; not divisible by either 2 or 3
    - How many integer numbers in the range 1-300 are divisible by at least one of the integers 4, 6 and 15 ?
    - Find the remainder of division
    - Why 3^n + 7^n - 2 is divisible by 8 for all positive integer n ?
    - 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
    - Find n-th term of a sequence
    - Solving Diophantine equations
    - How many integers of the form n^2 + 18n + 13 are perfect squares
    - Miscellaneous problems on divisibility numbers
    - Find the sum of digits of integer numbers
    - Two-digit numbers with digit "9"
    - Find a triangle with integer side lengths and integer area
    - Math circle level problem on the hundred-handed monster Briareus
    - Math Circle level problem on lockers and divisors of integer numbers
    - Nice entertainment problems related to divisibility properties
    - Solving problems on modular arithmetic
    - Using the little Fermat's theorem to solve a problem on modular arithmetic
    - OVERVIEW of miscellaneous solved problems on divisibility of integer numbers


This lesson has been accessed 645 times.