manpreetsingh86 wrote:
prakash85 wrote:
Let f(x,y) be defined as the remainder when (x–y)! is divided by x. If x=25, what is the maximum value of y for which f(x,y)=0
1. 5
2. 10
3. 15
4.20
5. 25
we have to find the value of y for which (25-y)!/ 25 yields zero remainder
if y=20, then (25-20)!=5!, which clearly is not divisible by 5^2
thus our answer will be less than 20
let's try 15 (25-15)!=10!, which is clearly divisible by 5^2.
hence C
It's important to note why 10! is clearly divisible by 5^2, while 5! is not.
It is possible to find the prime factors and their powers of a factorial by counting the amount of times a prime factor p is contained within some number n for n!.
This is most easily done by taking the floor value, or rounding to the next highest whole integer, when dividing out n by p to see how many numbers between p and n have a factor of p.
One must also remember to be mindful of the fact that there most likely exist numbers with multiple factors of p, in which case you must keep dividing by p until floor(p) = 0.
In this case, 5! clearly has no factors of 5^2 because floor(5/5) (or n/p, where n is taken from 5! and p is taken from 5^2) = 1, and floor(1/5) = 0. This means that the power of 5 in the prime factorization of 5! is 1, so it does not contain 5^2.
10!, however, clearly has a factor of 5^2 because floor(10/5) = 2, so the prime factorization of 10! contains 5^2. Continuing this factorization further purely to see how this method works, the prime factorization contains 8 2's (floor(10/2) = 5, floor(5/2) = 2, floor(2/2) = 1, 5+2+1 = 8).
I hope this method can help to quickly identify prime factors of factorials!