problem from nishit sinha book
hi,
The following is the problem given in nishit sinha book.
What's the remainder when 25! is divided by 10^7.
1. 2
2. 4 X 10^6
3. 6 X 10^6
4. 2 X 10^6
thank u.
n/a
bhai i am getting 2 as reminder...
107=27 * 57
max power of 2 and 5 in 25! is 22 and 6
therefore dividing 25! by 10^7 = 5^6 * 2^22 * P/(5^7 * 2^7) = 2^15 * P/5
where P is the multiplication of different powers of other primes (other than 2 and 5) till 25
now the nuemerator and denominator are co-prime to each other
2^15 * 3^10 * 7^3 * 11^2 * 13 *17* 19*23 mod 5 = 2^3 * 3^2 * 7^3 *1 *3 * 2*4*3 mod 5 = 2* 3*1*3*2*4*3 mod 5
=2^4 * 3^3 mod 5 = 1 * 2 mod 5=
hence 2 is the reminder.
Alternately, it is same as finding the digit at the 10^7 place of 25!.
I know its coming..... and I know i can handle it the best....
n/a
s shahid basha
hello nishit,
First thank u for the solution. But there are some doubts lingering in my mind. Hope that u will clear them.
why r u dividing the number with 10^6 instead of 10^7 ?
thank u
n/a
He is not dividing 106 . . .he is caluating (25!/106) mod 10
The asnwer is definitely 4 x 106 but i just couldnt find where you are making the mistake.
s shahid basha
sorry i think i did'nt express my doubt clearly. I'm weak in finding out remainders. If possible please
explain me clearly. I was referring to the step
And the reminder of above number divided by 106 is (x) 0 0 0 0 0 0.
thank u
n/a
Sorry that is 107
I have rectified it. .but still i feel some thing is wrong. . in logic. . what & where. . i 'll write in details once i fig it out
n/a
Bhai ek baat batao...
if a no. has x zeros at its end precided by some non zero quantity then when the no is divided by 10^(x+1)... then reminder mein woh last non-zero digit hin aayega na...
what you say...
so i cant understand the logic of 4*10^6 or even 2*10^6
what everyone says..
I know its coming..... and I know i can handle it the best....
n/a
when u divide say a number 5700 by 1000 the reminder is 700 not 7. .
so reminder main only nonzero digit nahi. . nonzero digit with all the zeros aeyga
hope u got the point 
any how Thanks for your explanation . . it was gr8 indeed
toh
flaw kahan hai...
waisey bahut kripa hogi agar aap thoda vistar purvak bata payein ki 5700 divided by 1000 will leave 700 as reminder and not 7...
plz...
I know its coming..... and I know i can handle it the best....
n/a
If you are in India. Its already 3.30am . . .go to bed. . . weak up tomorrow morning and read your own message. .
You ‘ll definitely understand why it s not 2 . . .
5700 divided by 1000 gives 700 as reminder and
5007 divided by 1000 gives 7 as a reminder
Clear HAI ? ? ya Sprit mangbayein




25! Has 6 numbers of zeros at the end
[25/5] + [25/25] = 5 + 1 = 6
So we can write 25! As a b c . . some unknown number of digits . . (x) 0 0 0 0 0 0
= a b c . .some unknown number of digits . . 0 0 0 0 0 0 0 (7 zeros) + (x) 0 0 0 0 0 0
And the reminder of above number divided by 107 is (x) 0 0 0 0 0 0.
This is same as the question: Find the last non-zero digit of the number 25!
Here comes the difficult part.
Now we have to find digit x which is same as 25!/106 Mod 10.
now please refer to my following post to know how to calculate the above @
http://www.cat4mba.com/node/5310#comment-2844
Answer is 4 x 106
n/a
n/a