GMAT Question of the Day - Daily to your Mailbox; hard ones only

 It is currently 15 Oct 2019, 15:08

### GMAT Club Daily Prep

#### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.

Customized
for You

we will pick new questions that match your level based on your Timer History

Track

every week, we’ll send you an estimated GMAT score based on your performance

Practice
Pays

we will pick new questions that match your level based on your Timer History

# Everything about Factorials on the GMAT

Author Message
TAGS:

### Hide Tags

Math Expert
Joined: 02 Sep 2009
Posts: 58340

### Show Tags

Updated on: 23 Aug 2018, 19:12
160
2
460
FACTORIALS

This post is a part of [GMAT MATH BOOK]

created by: Bunuel
edited by: bb, Bunuel

--------------------------------------------------------

Definition

The factorial of a non-negative integer $$n$$, denoted by $$n!$$, is the product of all positive integers less than or equal to $$n$$.

For example: $$4!=1*2*3*4=24$$.

Properties

• Factorial of a negative number is undefined.
• $$0!=1$$, zero factorial is defined to equal 1.
• $$n!=(n-1)!*n$$, valid for $$n\geq{1}$$.

Trailing zeros:

Trailing zeros are a sequence of 0's in the decimal representation of a number, after which no other digits follow. For example: 125,000 has 3 trailing zeros;

The number of trailing zeros in the decimal representation of n!, the factorial of a non-negative integer $$n$$, can be determined with this formula:

$$\frac{n}{5}+\frac{n}{5^2}+\frac{n}{5^3}+...+\frac{n}{5^k}$$, where $$k$$ must be chosen such that $$5^k\leq{n}$$

Example:
How many zeros are in the end (after which no other digits follow) of 32!?

$$\frac{32}{5}+\frac{32}{5^2}=6+1=7$$. Notice that the denominators must be less than or equal to 32 also notice that we take into account only the quotient of division (that is $$\frac{32}{5}=6$$ not 6.4). Therefore, 32! has 7 trailing zeros.

The formula actually counts the number of factors 5 in $$n!$$, but since there are at least as many factors 2, this is equivalent to the number of factors 10, each of which gives one more trailing zero.

Finding the powers of a prime number p, in the n!

The formula is:
$$\frac{n}{p}+\frac{n}{p^2}+\frac{n}{p^3}+...+\frac{n}{p^k}$$, where $$k$$ must be chosen such that $$p^k\leq{n}$$

Example:
What is the power of 2 in 25!?

$$\frac{25}{2}+\frac{25}{4}+\frac{25}{8}+\frac{25}{16}=12+6+3+1=22$$.

See this post to understand rationale behing this formulae

_________________________________________________________________________________________________
Questions to practice:
http://gmatclub.com/forum/if-60-is-writ ... 01752.html
http://gmatclub.com/forum/how-many-zero ... 00599.html
http://gmatclub.com/forum/find-the-numb ... 08249.html
http://gmatclub.com/forum/find-the-numb ... 08248.html
http://gmatclub.com/forum/if-n-is-the-p ... 01187.html
http://gmatclub.com/forum/if-m-is-the-p ... 08971.html
http://gmatclub.com/forum/if-p-is-a-nat ... 08251.html
http://gmatclub.com/forum/if-10-2-5-2-i ... 06060.html
http://gmatclub.com/forum/p-and-q-are-i ... 09038.html
http://gmatclub.com/forum/question-abou ... 08086.html
http://gmatclub.com/forum/if-n-is-the-p ... 06289.html
http://gmatclub.com/forum/what-is-the-g ... 05746.html
http://gmatclub.com/forum/if-d-is-a-pos ... 26692.html
http://gmatclub.com/forum/if-10-2-5-2-i ... 06060.html
http://gmatclub.com/forum/how-many-zero ... 42479.html
_________________

Originally posted by Bunuel on 05 Oct 2009, 05:02.
Last edited by adkikani on 23 Aug 2018, 19:12, edited 2 times in total.
UPDATED.
Math Expert
Joined: 02 Sep 2009
Posts: 58340

### Show Tags

25 Oct 2009, 22:51
17
13
noboru wrote:
Point 1 is just point 2 for k=5, isnt it?

Yes, it is. I've separated them as for GMAT generally we need only trailing zeros and almost never other prime's power.

shalva wrote:
Can you please post this one too? It's still interesting, though may not be usable for GMAT.

It's better to illustrate it on the example:
How many powers of 900 are in 50!
$$900=2^2*3^2*5^2$$

Find the power of 2:
$$\frac{50}{2}+\frac{50}{4}+\frac{50}{8}+\frac{50}{16}+\frac{50}{32}=25+12+6+3+1=47$$

= $$2^{47}$$

Find the power of 3:
$$\frac{50}{3}+\frac{50}{9}+\frac{50}{27}=16+5+1=22$$

=$$3^{22}$$

Find the power of 5:
$$\frac{50}{5}+\frac{50}{25}=10+2=12$$

=$$5^{12}$$

We need all of them (2,3,5) to be represented twice in 900, 5 can provide us with only 6 pairs, thus there is 900 in the power of 6 in 50!
900^6
_________________
Director
Joined: 16 Jul 2009
Posts: 780
Schools: CBS
WE 1: 4 years (Consulting)

### Show Tags

23 Oct 2009, 01:56
4
8
Bunuel wrote:
If you are aiming for 700+ in GMAT you should know 2 important things about factorials:

1. Trailing zeros:
Trailing zeros are a sequence of 0s in the decimal representation (or more generally, in any positional representation) of a number, after which no other digits follow.

125000 has 3 trailing zeros;

The number of trailing zeros in the decimal representation of n!, the factorial of a non-negative integer n, can be determined with this formula:

$$\frac{n}{5}+\frac{n}{5^2}+\frac{n}{5^3}+...+\frac{n}{5^k}$$, where k must be chosen such that 5^(k+1)>n

It's more simple if you look at an example:

How many zeros are in the end (after which no other digits follow) of 32!?
$$\frac{32}{5}+\frac{32}{5^2}=6+1=7$$ (denominator must be less than 32, $$5^2=25$$ is less)

So there are 7 zeros in the end of 32!

The formula actually counts the number of factors 5 in n!, but since there are at least as many factors 2, this is equivalent to the number of factors 10, each of which gives one more trailing zero.

2. Finding the number of powers of a prime number k, in the n!.

What is the power of 3 in 35! ?

The formula is:
$$\frac{n}{k}+\frac{n}{k^2}+\frac{n}{k^3}$$ ... till $$n>k^x$$

What is the power of 2 in 25!
$$\frac{25}{2}+\frac{25}{4}+\frac{25}{8}+\frac{25}{16}=12+6+3+1=22$$

There is another formula finding powers of non prime in n!, but think it's not needed for GMAT.

Point 1 is just point 2 for k=5, isnt it?
_________________
The sky is the limit
800 is the limit

GMAT Club Premium Membership - big benefits and savings
##### General Discussion
Founder
Joined: 04 Dec 2002
Posts: 18200
Location: United States (WA)
GMAT 1: 750 Q49 V42
GPA: 3.5

### Show Tags

21 Oct 2009, 13:20
10
This post has been split off the original discussion and cleaned up for reference.
_________________
Founder of GMAT Club

Just starting out with GMAT? Start here...

Tuck School Moderator
Joined: 20 Aug 2009
Posts: 247
Location: Tbilisi, Georgia
Schools: Stanford (in), Tuck (WL), Wharton (ding), Cornell (in)

### Show Tags

23 Oct 2009, 05:57
1
Bunuel

Valuable post! +1

Quote:
There is another formula finding powers of non prime in n!, but think it's not needed for GMAT.

Can you please post this one too? It's still interesting, though may not be usable for GMAT
Intern
Joined: 08 Sep 2009
Posts: 4

### Show Tags

30 Oct 2009, 16:46
1
Bunuel wrote:

How many zeros are in the end (after which no other digits follow) of 32!?
$$\frac{32}{5}+\frac{32}{5^2}=6+1=7$$ (denominator must be less than 32, $$5^2=25$$ is less)

So there are 7 zeros in the end of 32!

If you actually go and check 32! in Excel the result will be 263130836933694000000000000000000000

So more like 21 zeros... I really hope Excel is making a mistake because of how neat is your formula but someone please explain!?
Math Expert
Joined: 02 Sep 2009
Posts: 58340

### Show Tags

30 Oct 2009, 17:22
6
1
juukkk wrote:
Bunuel wrote:

How many zeros are in the end (after which no other digits follow) of 32!?
$$\frac{32}{5}+\frac{32}{5^2}=6+1=7$$ (denominator must be less than 32, $$5^2=25$$ is less)

So there are 7 zeros in the end of 32!

If you actually go and check 32! in Excel the result will be 263130836933694000000000000000000000

So more like 21 zeros... I really hope Excel is making a mistake because of how neat is your formula but someone please explain!?

32! = 263130836933693530167218012160000000 This is what 32! really equals to.
32!= 263130836933694000000000000000000000 Accoroding to Excell. Don't worry it's just rounded, so formula is correct.
_________________
Intern
Joined: 08 Sep 2009
Posts: 4

### Show Tags

30 Oct 2009, 17:28
2
Bunuel wrote:

32! = 263130836933693530167218012160000000 This is what 32! really equals to.
32!= 263130836933694000000000000000000000 Accoroding to Excell. Don't worry it's just rounded, so formula is correct.

Kudos given and formula memorized already. From where did you got the what "32! really equals to"?
Founder
Joined: 04 Dec 2002
Posts: 18200
Location: United States (WA)
GMAT 1: 750 Q49 V42
GPA: 3.5

### Show Tags

31 Oct 2009, 04:19
1
juukkk wrote:
Bunuel wrote:

32! = 263130836933693530167218012160000000 This is what 32! really equals to.
32!= 263130836933694000000000000000000000 Accoroding to Excell. Don't worry it's just rounded, so formula is correct.

Kudos given and formula memorized already. From where did you got the what "32! really equals to"?

Wow. I want to know how you calculated it too
_________________
Founder of GMAT Club

Just starting out with GMAT? Start here...

Math Expert
Joined: 02 Sep 2009
Posts: 58340

### Show Tags

31 Oct 2009, 22:07
4
1
Wiki has the the answer to 32! on trailing zeros article.
_________________
Intern
Joined: 23 Oct 2005
Posts: 14

### Show Tags

03 Jan 2010, 20:16
2
Hi,

I just went through this thread. I understand point# 1 about trailing zeroes. However, for the life of me, I cant understand Point#2.
Can anyone please explain me what are we really trying to solve in "2. Finding the number of powers of a prime number k, in the n!."

For the question "What is the power of 2 in 25!", the answer is given as 22. What does it mean ?

Thanks
Math Expert
Joined: 02 Sep 2009
Posts: 58340

### Show Tags

04 Jan 2010, 00:34
2
aim-high wrote:
Hi,

I just went through this thread. I understand point# 1 about trailing zeroes. However, for the life of me, I cant understand Point#2.
Can anyone please explain me what are we really trying to solve in "2. Finding the number of powers of a prime number k, in the n!."

For the question "What is the power of 2 in 25!", the answer is given as 22. What does it mean ?

Thanks

25! is some number, let's say x. Power of 2 (highest power, 2 will have) in 25!, means the power of 2 in prime factorization of x.

For example: $$5!=120=2^3*3*5$$, so the power of 2 in 5! is 3.
_________________
Manager
Joined: 23 Apr 2010
Posts: 107
Location: Tx
Schools: NYU,UCLA,BOOTH,STANFORD

### Show Tags

12 Jul 2010, 07:19
We need all of them (2,3,5) to be represented twice in 900, 5 can provide us with only 6 pairs, thus there is 900 in the power of 6 in 50!
900^6

bruel i just dont understand that part. CAn you explain it plz
_________________
This is not finished here...Watch me.....
Math Expert
Joined: 02 Sep 2009
Posts: 58340

### Show Tags

12 Jul 2010, 07:26
3
2
fatihaysu wrote:
We need all of them (2,3,5) to be represented twice in 900, 5 can provide us with only 6 pairs, thus there is 900 in the power of 6 in 50!
900^6

bruel i just dont understand that part. CAn you explain it plz

$$50!=900^xa=(2^2*3^2*5^2)^x*a$$, where $$x$$ is the highest possible value of 900 and $$a$$ is the product of other multiples of $$50!$$.

$$50!=2^{47}*3^{22}*5^{12}*b=(2^2*3^2*5^2)^6*(2^{35}*3^{10})*b=900^{6}*(2^{35}*3^{10})*b$$, where $$b$$ is the product of other multiples of $$50!$$. So $$x=6$$.

Below is another example:

Suppose we have the number $$18!$$ and we are asked to to determine the power of $$12$$ in this number. Which means to determine the highest value of $$x$$ in $$18!=12^x*a$$, where $$a$$ is the product of other multiples of $$18!$$.

$$12=2^2*3$$, so we should calculate how many 2-s and 3-s are in $$18!$$.

Calculating 2-s: $$\frac{18}{2}+\frac{18}{2^2}+\frac{18}{2^3}+\frac{18}{2^4}=9+4+2+1=16$$. So the power of $$2$$ (the highest power) in prime factorization of $$18!$$ is $$16$$.

Calculating 3-s: $$\frac{18}{3}+\frac{18}{3^2}=6+2=8$$. So the power of $$3$$ (the highest power) in prime factorization of $$18!$$ is $$8$$.

Now as $$12=2^2*3$$ we need twice as many 2-s as 3-s. $$18!=2^{16}*3^8*a=(2^2)^8*3^8*a=(2^2*3)^8*a=12^8*a$$. So $$18!=12^8*a$$ --> $$x=8$$.

Hope it's clear.
_________________
Intern
Joined: 13 Jul 2010
Posts: 2

### Show Tags

13 Jul 2010, 06:21
can anyone tell me how to calculate the no.of factors for 20!. well this was a small number if i would have to answer a bigger number like no.of factors for 720! what will be the solution.
Math Expert
Joined: 02 Sep 2009
Posts: 58340

### Show Tags

13 Jul 2010, 08:29
3
1
yasar434 wrote:
can anyone tell me how to calculate the no.of factors for 20!. well this was a small number if i would have to answer a bigger number like no.of factors for 720! what will be the solution.

You won't need this for GMAT but still let's see if we can do it:

First we should make prime factorization of 20!. 20! will have all primes from 0 to 20, so we should find the powers of these primes in 20!.

Powers of 2 --> $$\frac{20}{2}+\frac{20}{4}+\frac{20}{8}+\frac{20}{16}=10+5+2+1=18$$;
Powers of 3 --> $$\frac{20}{3}+\frac{20}{9}=6+2=8$$;
Powers of 5 --> $$\frac{20}{5}=4$$;
Powers of 7 --> $$\frac{20}{7}=2$$;
Powers of 11 --> $$\frac{20}{11}=1$$;
Powers of 13 --> $$\frac{20}{13}=1$$;
Powers of 17 --> $$\frac{20}{17}=1$$;
Powers of 19 --> $$\frac{20}{19}=1$$.

So $$20!=2^{18}*3^8*5^4*7^2*11^1*13^1*17^1*19^1$$.

Next: How to Find the Number of Factors of an Integer.

First make prime factorization of an integer $$n=a^p*b^q*c^r$$, where $$a$$, $$b$$, and $$c$$ are prime factors of $$n$$ and $$p$$, $$q$$, and $$r$$ are their powers.

The number of factors of $$n$$ will be expressed by the formula $$(p+1)(q+1)(r+1)$$. NOTE: this will include 1 and n itself.

Example: Finding the number of all factors of 450: $$450=2^1*3^2*5^2$$

Total number of factors of 450 including 1 and 450 itself is $$(1+1)*(2+1)*(2+1)=2*3*3=18$$ factors.

So, the # of positive factors of $$20!=2^{18}*3^8*5^4*7^2*11^1*13^1*17^1*19^1$$ will be $$(18+1)(8+1)(4+1)(2+1)(1+1)(1+1)(1+1)(1+1)=19*9*5*3*2*2*2*2=41040$$.

The same way we can find for 720!, but we'll need much more time.

Hope it helps.
_________________
Intern
Joined: 24 Jan 2011
Posts: 5

### Show Tags

17 Jan 2012, 23:03
Im getting a problem trying to use the formula.
When looking for power of 3 in 35! i do
35/3 + 35/9 + 35/27 = 11+3+1 = 15

But I've multiplied out the factorial 32! and get 18 3's including the square for 9 and the cubed for 27. Am i doing something wrong?
Math Expert
Joined: 02 Sep 2009
Posts: 58340

### Show Tags

18 Jan 2012, 04:37
theptrk wrote:
Im getting a problem trying to use the formula.
When looking for power of 3 in 35! i do
35/3 + 35/9 + 35/27 = 11+3+1 = 15

But I've multiplied out the factorial 32! and get 18 3's including the square for 9 and the cubed for 27. Am i doing something wrong?

Yes, as formula is correct then it must be that you have miscalculated.

By the way here is complete factorization of 35!: $$35!=2^{32}*3^{15}*5^8*7^5*11^3*13^2*17^2*19*23*29*31$$, so you can see that the power of 3 is indeed 15.
_________________
Manager
Joined: 14 Dec 2011
Posts: 50
GMAT 1: 630 Q48 V29
GMAT 2: 690 Q48 V37

### Show Tags

15 Mar 2012, 00:31
Bunuel wrote:
If you are aiming for 700+ in GMAT you should know 2 important things about factorials:

2. Finding the number of powers of a prime number k, in the n!.

What is the power of 2 in 25!
$$\frac{25}{2}+\frac{25}{4}+\frac{25}{8}+\frac{25}{16}=12+6+3+1=22$$

How come I get completely different results when I use my calculator to get 25! and 2^22?

Did I understand it wrong?
Math Expert
Joined: 02 Sep 2009
Posts: 58340

### Show Tags

15 Mar 2012, 02:09
Impenetrable wrote:
Bunuel wrote:
If you are aiming for 700+ in GMAT you should know 2 important things about factorials:

2. Finding the number of powers of a prime number k, in the n!.

What is the power of 2 in 25!
$$\frac{25}{2}+\frac{25}{4}+\frac{25}{8}+\frac{25}{16}=12+6+3+1=22$$

How come I get completely different results when I use my calculator to get 25! and 2^22?

Did I understand it wrong?

25! is a huge number, not many calculators can handle it. Check whether it gives you the following result: 25!=15,511,210,043,330,985,984,000,000.
_________________
Re: Everything about Factorials on the GMAT   [#permalink] 15 Mar 2012, 02:09

Go to page    1   2    Next  [ 34 posts ]

Display posts from previous: Sort by