rsciretta14 wrote:

Can someone please confirm why the answer is not 10? (i.e. 5*2). I understand how to do prime factorization just want to confirm my understanding of why the answer is not 2*5. Thanks for your help.

Let me try to explain for the sake of self-edification.

n is a +int (because negative factorial is undefined), and saying the product of all ints 1 to n is the same as saying n!

So we are looking for a n! that will equal 990*k (k is some number which has all the other factors of n!)

In other words, 1*2*3*...*n = 990*k

Prime factorization of 990 = 9*10*11 = (3^2)*(2*5)*11

So we have 1*2*3*...*n = 2*9*5*11 * k

The least possible n has to be a number that makes our equation true.

The reason it can't be 10 is because 10! won't have the prime number 11, which we need to make 990 on LHS of equation.

Writing it out:

1*2*3*4*5*6*7*8*9*10*11 = 1*2*3*_*5*_*_*_*_*_*11 *k

So for the equation to be true the other factors of n! (4, 6 [2*other 3 here], 7, 8, 9, 10) have to be in k.

Please let me know if I made an error.

_________________

"Step by step walk the thousand-mile road ... Today is victory over yourself of yesterday; tomorrow is your victory over lesser men."

-Miyamoto Musashi, The Book of Five Rings