SOLUTION: If the product represented by 128! is divisible by 18^n, what is the largest possible value of n?.

Algebra ->  Divisibility and Prime Numbers -> SOLUTION: If the product represented by 128! is divisible by 18^n, what is the largest possible value of n?.       Log On


   



Question 1103536: If the product represented by 128! is divisible by 18^n, what is the largest possible value of n?.

Answer by greenestamps(13203) About Me  (Show Source):
You can put this solution on YOUR website!


Let's look at a similar but simpler problem first, to see the strategy for solving them.

Find the number of zeros at the end of 400!.

The wording is different; however, we can rewrite the problem to ask the largest possible value of n for which 400! is divisible by 10^n. So the strategy for solving this problem is the same as your problem.

To get a zero at the end of a product, we need a factor of 10; that means we need a factor of 5 and a factor of 2.

In a factorial, we will obviously have more factors of 2 than of 5. So the number of zeros at the end of 400! will be the total number of factors of 5 in 400!.

To count the number of factors of 5 in 400!, we do the following:

1 of every 5 numbers from 1 to 400 has at least 1 factor of 5: 400/5 = 80.
1 of every 5 of the 80 numbers with at least 1 factor of 5 has another factor of 5: 80/5 = 16.
1 of every 5 of the 16 numbers with at least 2 factors of 5 has another factor of 5: 16/5 = 3.

The total number of factors of 5 in 400! -- and therefore the number of zeros at the end of 400! -- is 80+16+3 = 99.

Note we don't need to write out all the explanations for our calculations. The calculations alone look like this:
400/5 = 80
80/5 = 16
16/5 = 3
80+16+3 = 99


Now let's look at your problem.

We are looking for the number of factors of 18 in 128!. Each factor of 18 requires 2 factors of 3 and 1 factor of 2.

The number of factors of 3 in 128! is clearly less than the number of factors of 2 in 128!. So the answer to this problem will depend on the number of factors of 3 in 128!.

Factors of 3 in 128!:
128/3 = 42
42/3 = 14
14/3 = 4
4/3 = 1
42+14+4+1 = 61

Since we need 2 factors of 3 for each factor of 18, the number of factors of 18 in 128! is 61/2 = 30.

So the largest value of n for which 128! is divisible by 18^n is 30.