Quote:
Originally Posted by viveknitw
last non zero number of 15!
my approach-
so Z(15) = L(4^1)*Z(3)
z(3)=1*2*3=6
4^1=4
thus last digit 4
pls tell me where i m wrong!
|
to find the last non zero digit of any factorial remove all factors of 5 from it..
der ia funda dat..
1.the product of all numbers from 1to 10 not divisible by 5 ends in 6
i,e 1*2*3*4*6*7*8*9 =x6
2.product of all number from 11 to 20 not divisible by 5 ends in 6 i,e
11*12*13*14*16*17*18*19=x6
and so on...
now to get the rightmost non zero digit of a factorial we hav to divide it by the highest per of 5 and the same pwr of 2 ..
lets expand 15!
(15!)'=1*2*3*4*6*7*8*9 (complete)
*11*12*13*14
*1*2*3 (by removing factors of 5 i,e 5,10,15 becomes 1,2,3)
=6*4*6 (unit's digit)
=x4
hence the last digit of (15)'!=x4
so..far we hav divided 15! by 5^3..
now the quotient of division of (15!)' by 5^3 is x4 and is units digtis 4
now we hav to divide x4 by 2^3 tyo get the units digit of 15!
(15!)' %2^3 =R where Ris the rightmost nonzro digit of 15!
x4=8*xR
if R=3 then the units digit is forin the above equation
so the rightmost non zero digit of 15! is 3