You are on page 1of 2

How to Find Last Non-zero Digit of a Factorial by P L Patodia

Steps: 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 37 5 7 5 1 5 Sum Quotient 7 1 0 8 Remainder 2 2 1 As 8 is divisible by 4, we take 2 4 . Unit digit of 2 4 is 6 6 Factorial 2 2

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 159 5 31 5 6 5 1 5 Sum Quotient 31 6 1 0 38 Remainder 4 1 1 1 On dividing 38 by 4, we get 2. Unit digit of 2 2 is 4 4 Factorial 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 2345 5 469 5 93 5 18 5 3 5 Sum Quotient 469 93 18 3 0 583 Remainder 0 4 3 3 3 On dividing 83 by 4, we get 3. Unit digit of 23 is 8 4 6 6 6 8 Factorial

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 12345 5 2469 5 493 5 98 5 19 5 3 5 Sum Quotient 2469 493 98 19 3 0 3082 Remainder 0 4 3 3 4 3 On dividing 82 by 4, we get 2. Unit digit of 2 2 is 4 4 6 6 4 6 4 Factorial

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

You might also like