ajit257 wrote:

Q. if n is the product of integers from 1 to 20 inclusive what is the greatest integer k for which 2^k is a factor of n?

A. 10

B. 12

C. 15

D. 18

E. 20

any efficient way to solve such questions.

Theory that will help you in solving these questions efficiently:

I will take a simpler example first.

What is the greatest value of k such that 2^k is a factor of 10! ?

We need to find the number of 2s in 10!

Method:

Step 1: 10/2 = 5

Step 2: 5/2 = 2

Step 3: 2/2 = 1

Step 4: Add all: 5 + 2 + 1 = 8 (Answer)

Logic:

10! = 1*2*3*4*5*6*7*8*9*10

Every alternate number will have a 2. Out of 10 numbers, 5 numbers will have a 2. (Hence Step 1: 10/2 = 5)

These 5 numbers are 2, 4, 6, 8, 10

Now out of these 5 numbers, every alternate number will have another 2 since it will be a multiple of 4 (Hence Step 2: 5/2 = 2)

These 2 numbers will be 4 and 8.

Out of these 2 numbers, every alternate number will have yet another 2 because it will be a multiple of 8. (Hence Step 3: 2/2 = 1)

This single number is 8.

Now all 2s are accounted for. Just add them 5 + 2 + 1 = 8 (Hence Step 4)

These are the number of 2s in 10!.

Similarly, you can find maximum power of any prime number in any factorial.

If the question says 4^m, then just find the number of 2s and half it.

If the question says 6^m, then find the number of 3s and that will be your answer (because to make a 6, you need a 3 and a 2. You have definitely more 2s in 10! than 3s. So number of 3s is your limiting condition.)

Let's take this example: Maximum power of 6 in 40!.

40/3 = 13

13/3 = 4

4/3 = 1

Total number of 3s = 13 + 4 + 1 = 18

40/2 = 20

20/2 = 10

10/2 = 5

5/2 = 2

2/2 = 1

Total number of 2s in 40! is 20+10 + 5 + 2 + 1 = 38

Definitely, number of 3s are less so we can make only 18 6s in spite of having many more 2s.

Usually, the greatest prime number will be the limiting condition.

Perhaps you can answer your question yourself now.... and also answer one of mine: What happens if I ask for the greatest power of 12 in 30!?