Upload
panna-lal-patodia
View
26
Download
0
Embed Size (px)
DESCRIPTION
I present an original method to find last non zero digit of a factorial. The method is very simple.
Citation preview
How to Find Last Non-zero Digit of a Factorial
by P L PatodiaSteps:
1. Divide the factorial number by 5, take quotient and remainder. Again take quotient and divide it by 5 and take quotient and remainder. Repeat this process till quotient becomes 0.
2. Add all the quotient. Divide this by 4. If it is divisible by 4, then it becomes 4, otherwise take the remainder. Raise this to the power of 2 and take unit digit.
3. For each remainder, take unit digit of factorial. This number will be between 0 and 4. Ignore 0 and 1. For 2!, unit digit is 2. For 3!, unit digit is 6. For 4!, unit digit is 4.
4. Now multiply all these and you get last non-zero digit of a factorial.
Example 1: Compute Last Non-zero digit of 37!.
Number Quotient Remainder Factorial
375
7 2 2
75
1 2 2
15
0 1
Sum 8 As 8 is divisible by 4, we take 24 . Unit
digit of 24 is 6
6
On multiplying 2x2x6, we get unit digit as 4. So, last non-zero digit of 37! is 4.
Example 2: Compute Last Non-zero digit of 159!.
Number Quotient Remainder Factorial
1595
31 4 4
315
6 1
65
1 1
15
0 1
Sum 38 On dividing 38 by 4, we get 2. Unit digit of
22 is 4
4
On multiplying 4x4, we get unit digit as 6. So, last non-zero digit of 159! is 6.
Copyright P L Patodia
Example 3: Compute Last Non-zero digit of 2345!.
Number Quotient Remainder Factorial
23455
469 0
4695
93 4 4
935
18 3 6
185
3 3 6
35
0 3 6
Sum 583 On dividing 83 by 4, we get 3. Unit digit of
23 is 8
8
On multiplying 4x6x6x6x8, we get unit digit as 2. So, last non-zero digit of 2345! is 2.
Example 4: Compute Last Non-zero digit of 12345!.
Number Quotient Remainder Factorial
123455
2469 0
24695
493 4 4
4935
98 3 6
985
19 3 6
195
3 4 4
35
0 3 6
Sum 3082 On dividing 82 by 4, we get 2. Unit digit of
22 is 4
4
On multiplying 4x6x6x4x6x4, we get unit digit as 4. So, last non-zero digit of 12345! is 4.
From the above examples, it is clear that if you know how to divide by 5, you can easily find last non-zero digit of any factorial.
Copyright P L Patodia