# Factorial Concepts for CAT – Rightmost digit, Ending Zeroes, Power of a Prime

Wednesday, April 29th, 2020 We all know what factorials (n!) are. They look friendly and helpful but looks can be deceiving, as many quant problems have taught us. Probably it is because that Factorials are simple looking creatures, most students prefer attempting questions based on them rather than on Permutation & Combination or Probability. I will cover P&C and Probability at a later date but in today’s post I would like to discuss some fundas related to factorials, which as a matter of fact form the basis of a large number of P&C and Probability problems.

Some of the factorials that might speed up your calculation are:

0! = 1; 1! = 1; 2! = 2; 3! = 6; 4! = 24; 5! = 120; 6! = 720; 7! = 5040.

## Funda 1: Rightmost non-zero digit of n! or R(n!)

R(n!) = Last Digit of [ 2a x R(a!) x R(b!) ]

where n = 5a + b

Eg 1.1: What is the rightmost non-zero digit of 37! ?

• R (37!) = Last Digit of [ 27 x R (7!) x R (2!) ]
•  R (37!) = Last Digit of [ 8 x 4 x 2 ] = 4

Eg 1.2: What is the rightmost non-zero digit of 134! ?

•   R (134!) = Last Digit of [ 226 x R (26!) x R (4!) ]
•   R (134!) = Last Digit of [ 4 x R (26!) x 4 ]

We need to find out R (26!) = Last Digit of [ 25 x R (5!) x R (1!) ] = Last digit of [ 2 x 2 x 1 ] = 4

•   R (134!) = Last Digit of [ 4 x 4 x 4 ] = 4

## Funda 2: Power of a prime ‘p’ in a factorial (n!)

The biggest power of a prime ‘p’ that divides n! (or in other words, the power of prime ‘p’ in n!) is given by the sum of quotients obtained by successive division of ‘n’ by p.

Eg 2.1: What is the highest power of 7 that divides 1342!

•   [1342 / 7] = 191
•   [191 / 7] = 27
•   [27 / 7] = 3
•   Power of 7 = 191 + 27 + 3 = 221

Eg 2.2: What is the highest power of 6 that divides 134! ?

As 6 is not a prime number, we will divide it into its prime factors. 3 is the bigger prime, so its power will be the limiting factor. Hence, we need to find out the power of 3 in 134!

•   [134/3] = 44
•   [44/3] = 14
•   [14/3] = 4
•   [4/3] = 1
•   Power of 3 in 134! = 44 + 14 + 4 + 1 = 63

Eg 2.3: What is the highest power of 9 that divides 134! ?

As 9 is not a prime number, we will divide it into its prime factors. 9 is actually 32. The number of 3s available is 63, so the number of 9s available will be [63/2] = 31.

Highest power of 9 that divides 134! is 31.

Highest power of 18 and 36 will also be 31. Highest power of 27 will be [63/3] = 21.

Note: To find out the highest power of a composite number, always try and find out which number (or prime number) will become the limiting factor. Use that to calculate your answer. In most cases you can just look at a number and say that which one of its prime factors will be the limiting factor. If it is not obvious, then you may need to find it out for two of the prime factors. The above method can be used for doing the same.

## Funda 3: Number of ending zeroes in a factorial (n!)

Number of zeroes is given by the sum of the quotients obtained by successive division of ‘n’ by 5.

This is actually an extension of Funda 1. Number of ending zeroes is nothing else but the number of times n! is divisible by 10 or in other words, the highest power of 10 that divides n!. 10 is not a prime number and its prime factors are 2 and 5. ‘5’ becomes the limiting factor and leads to the above-mentioned idea.

Eg 3.1: What is the number of ending zeroes in 134! ?

•   [134/5] = 26
•   [26/5] = 5
•   [5/5] = 1
•   Number of ending zeroes = 26 + 5 + 1 = 32

I hope that this gets you started with factorials and you might start singing this song.

## Other posts related to Quantitative Aptitude – Number Systems

### CAT Questions related to Quantitative Aptitude – Number Systems

All questions from CAT Exam Quantitative Aptitude – Number Systems
Quantitative Aptitude – Number Systems – Q1: If the product of three consecutive positive integers is 15600 then the sum of the squares of these integers is
Quantitative Aptitude – Number Systems – Q2: If a, b, c are three positive integers such that a and b are in the ratio 3 : 4 while b and c are in the ratio 2:1, then which one of the following is a possible value of (a + b + c)?
Quantitative Aptitude – Number Systems – Q3: The numbers 1, 2,…,9 are arranged in a 3 X 3 square grid in such a way that each number occurs once and the entries along each column, each row, and each of the two diagonals add up to the same value.

## Online Coaching Course for CAT 2020

a) 900+ Videos covering entire CAT syllabus
b) 2 Live Classes (online) every week for doubt clarification
c) Study Material & PDFs for practice and understanding
d) 10 Mock Tests in the latest pattern
e) Previous Year Questions solved on video

If you Like this post then share it!

This site uses Akismet to reduce spam. Learn how your comment data is processed.