(1) How many trailing zeros will be there after the rightmost non-zero digit in the value of 25! ?
(2) What is the remainder when 1044*1047*1050*1053 is divided by 33 ?
Now let's start dividing this by 10 until we can't do it anymore, keeping a tally all the while!
So divide it by 10 and that gets rid of the 10! (1)
Divide it by 2 and 5, is the same as divide by 10, so that will get rid of the 2 and the 5! (2)
Divide it by 2 and 5 again. Let the 5 divide the 25, and let the 2 divide the 24!(3)
Divide it by 2 and 5 again. Let the 2 divide the 12, and the 6 divide the 5! (4)
Divide by 2 and 5 again. The 2 divides the 6, and the 5 divides the 20! (5)
Divide by 2 and 5 again, let the 2 divide the 22, and the 5 divide the 15. (6)
Now there are no more multiples of 5 in there. And ALL multiples of 10 are also multiples of 5. So we are finished.
There are 6 zeros.
there is no need of this thing
Now let's start dividing this by 10 until we can't do it anymore, keeping a tally all the while!
So divide it by 10 and that gets rid of the 10! (1)
Divide it by 2 and 5, is the same as divide by 10, so that will get rid of the 2 and the 5! (2)
Divide it by 2 and 5 again. Let the 5 divide the 25, and let the 2 divide the 24!(3)
Divide it by 2 and 5 again. Let the 2 divide the 12, and the 6 divide the 5! (4)
Divide by 2 and 5 again. The 2 divides the 6, and the 5 divides the 20! (5)
Divide by 2 and 5 again, let the 2 divide the 22, and the 5 divide the 15. (6)
Now there are no more multiples of 5 in there. And ALL multiples of 10 are also multiples of 5. So we are finished.
There are 6 zeros.
there is a formula for this
and i m sorry i posted wrong answer, as i was in hurry at that time
Indeed there is. Although it's quite a complicated formula it can be reduced to a simple algorithm:
Take 25, and divide it by 5. You get 5.
Take 25 and divide it by 5^2. You get 1.
Take 25 and divide it by 5^3...
Take 25 and divide it by 5^4...
And the idea is that you keep doing this until you get a result that is less than 1! When you get to that result, take all the results you get beforehand and sum them. That is the number of trailing zeroes.
In our example 25/5^3 = 0.2, so we sum the results before that, 1 and 5. We get 6.
Note: If you ever get a result that is MORE than 1, but isn't an integer, you round down to the nearest integer. So it you get 4.2, you would round down to 4. If you get 4.9999999, you would round down to 4.
formula to find highest power of prime p dividing n!
[n/p]+[n/(p^2)]+[n/(p^3)]+[n/(p^4)]+[n/(p^5)]+.....
till [n\(p^m)]=0 for some m
[] ->greatest integer function
since 10 is not a prime number
so we factorize it and we get 2 and 5, since 2x5=10
so first put p=2
[25/2]+[25/4]+[25/8]+[25/16]+[25/32]+....
12+6+3+1+0(STOP)
=22
and then similarly put p=5
u get 6
this implies
2^22 and 5^6 are factors of 25!
this implies
(2^22)*(5^6)=(10^6)*(2^16)
therefore 10^6 is a factor of 25!
hence there are 6 zero's to the right of non-zero in 25!
Let be the function that finds the number of trailing zeros of a factorial . Then :
You must choose such that .
denotes the flooring function. The flooring function takes any real number m and rounds it to the nearest integer r such that i.e., it always rounds DOWN.
In our example, we want to find the trailing zeros in . Hence
The lowest integer such that is 2.
Hence!
If is the largest natural number such that then there are trailing zeros on .
That is is the power of in the prime decomposition of .
Now look at , is a factor of single multiplicity of , , and and of multiplicity of . These multiplicities sum to so there are trailing zeros to (because there are enough even numbers to add a zero for every one of the factors of )
.