Copyright © University of Cambridge. All rights reserved.

'Powerful Factorial' printed from https://nrich.maths.org/

Show menu


There were lots of interesting patterns that could be identified and explained in this problem. Ngoc from Nguyen Truong To junior high school (Vietnam) identified some interesting patterns along with giving the answers. Well done Ngoc. It is also good, once you have identified patterns, to try to explain them in terms of the mathematics they came from. So where do the patterns Ngoc and Andrei (School 205, Bucharest) come from?

Ngoc's contribution:

The highest power of 2 that divides exactly to 100! is 97
The highest power of 3 that divides exactly to 100! is 48

General form:

with all n, k are positive integers, n > k
The highest power of k (called y) that divides exactly to n! is:

y = n/k + n/k 2 + n/k 3 + ... + n/k z
with n/k, n/k 2 ... are nearest integers, and z < = n

Andrei's Contribution

I started working with 100!.

  • I observe that the greatest number - power of 2 that is smaller than 100 is 2 6 . It enters 100 only once.
  • Now, I consider the consecutive power of 2 smaller than 2 6 (2 5 ). This number enters in 100 3 times. However, it is clear that 2 6 is divisible with 2 5 . Therefore, I take this number (3 - 1 =) 2 times.
  • Now, I take 2 4 . It enters in 100 6 times. However, three of the six combinations is also a multiple of 32 (including 64).So, I take this number (6 - 3 =) 3 times.
  • It is now the turn of 2 3 . It enters in 100 12 times. However, here it is also the case that six were also multiples of 16. So, there remain only six combinations.
  • The case of 2 2 is similar it enters in 100 25 times, but there remain only 13 combinations.
  • Finally, two. It enters in 100 50 times, but I use only 25 of them.

To calculate the total highest power of two that divides exactly into 100! is calculating by multiplying the corresponding power of two with the number of solutions and multiplying the results, because it is 100!:

(2 6 ) 1 * (2 5 ) 2 * (2 4 ) 3 * (2 3 ) 6 * (2 2 ) 13 * (2 1 ) 25 = 2 6 * 2 10 * 2 12 * 2 18 * 2 26 * 2 25 = 2 97

I use the same method for dividing 100! into powers of three:

Power of 3 3n < 100! Combinations Result
3 4 1 1 1
3 3 3 3 - 1 2
3 2 11 11 - 3 8
3 33 33 - 11 2

Here the greatest power of three that divides exactly into 100!:

(3 4 ) 1 * (3 3 ) 2 * (3 2 ) 8 * (3 1 ) 22 = 3 4 * 3 6 * 3 16 * 3 22 = 3 48

Now, the general method with n! as the number, and x as the number whose powers enter n!:

  • Calculate the greatest power of x k that is smaller than n and observe how many times it enters n. Note the result with a.
  • Calculate how many times x k-1 enters n. Then subtract the precedent result (before subtracting something). Note the result with b.
  • Continue this method up to x 1 .
  • Now, calculate the greatest power of x that divides exactly into n: (x k ) a * (x k-1 ) b * (x k-2 ) c * ... * (x 1 ) z

I would like to mention that I used for 100! and for the powers of 2 the traditional method, it means 100 is divisible by 2 2 , 98 by 2, ? and so on, and I obtained the same result as before.