Value of N

This topic has expert replies
Master | Next Rank: 500 Posts
Posts: 113
Joined: Wed Dec 07, 2011 7:20 am
Thanked: 3 times

Value of N

by manik11 » Tue Nov 03, 2015 4:43 am
What is the value of N?

(1) N! ends with 28 zeroes

(2) (N+2)! ends with 31 zeroes and (N-1)! ends with 28 zeroes

OA : E

Can we test numbers on this questions?
Source: — Data Sufficiency |

User avatar
GMAT Instructor
Posts: 15539
Joined: Tue May 25, 2010 12:04 pm
Location: New York, NY
Thanked: 13060 times
Followed by:1906 members
GMAT Score:790

by GMATGuruNY » Tue Nov 03, 2015 5:25 am
This problem is about TRAILING 0's: the number of 0's at the end of a large product.

If N = 120, then N! = 120*119*118*....*3*2*1.

Since 10=2*5, EVERY COMBINATION OF 2*5 contained within the prime-factorization of 120! will yield a 0 at the end of the integer representation of 120!.
The prime-factorization of 120! is composed of FAR MORE 2'S than 5's.
Thus, the number of 0's depends on the NUMBER OF 5's contained within 120!.

To count the number of 5's, simply divide increasing POWERS OF 5 into 120.

Every multiple of 5 within 120! provides at least one 5:
120/5 = 24 --> 24 5's.
Every multiple of 5² provides a SECOND 5:
120/5² = 4 --> 4 more 5's.
Thus, the total number of 5's contained within 120! = 24+4 = 28.

Note that 121!, 122!, 123!, and 124! all contain the same number of 5's as 120!.

For more than 28 5's to be contained within N!, N must be AT LEAST 125, the next greatest multiple of 5 after 120.
Every multiple of 5 within 125! provides at least one 5:
125/5 = 25 --> 25 5's.
Every multiple of 5² provides a SECOND 5:
125/5² = 5 --> 5 more 5's.
Every multiple of 5³ provides a THIRD 5:
125/5³ = 1 --> 1 more 5.
Thus, the total number of 5's contained within 125! = 25+5+1 = 31.

Note that 126!, 127!, 128!, and 129! all contain the same number of 5's as 125!.

Onto the problem:
What is the value of N?

(1) N! ends with 28 zeroes

(2) (N+2)! ends with 31 zeroes and (N-1)! ends with 28 zeroes
The following cases satisfy both statements:

Case 1: N=123
(123+2)! = 125!, which has 31 5's.
(123-1)! = 122!, which has 28 5's.

Case 2: N=124
(124+2)! = 126!, which has 31 5's.
(124-1)! = 123!, which has 28 5's.

Thus, the two statements combined are INSUFFICIENT.

The correct answer is E.
Private tutor exclusively for the GMAT and GRE, with over 20 years of experience.
Followed here and elsewhere by over 1900 test-takers.
I have worked with students based in the US, Australia, Taiwan, China, Tajikistan, Kuwait, Saudi Arabia -- a long list of countries.
My students have been admitted to HBS, CBS, Tuck, Yale, Stern, Fuqua -- a long list of top programs.

As a tutor, I don't simply teach you how I would approach problems.
I unlock the best way for YOU to solve problems.

For more information, please email me (Mitch Hunt) at [email protected].
Student Review #1
Student Review #2
Student Review #3

Master | Next Rank: 500 Posts
Posts: 113
Joined: Wed Dec 07, 2011 7:20 am
Thanked: 3 times

by manik11 » Tue Nov 03, 2015 6:04 am
GMATGuruNY wrote: Since 10=2*5, EVERY COMBINATION OF 2*5 contained within the prime-factorization of 120! will yield a 0 at the end of the integer representation of 120!.
The prime-factorization of 120! is composed of FAR MORE 2'S than 5's.
Thus, the number of 0's depends on the NUMBER OF 5's contained within 120!.

To count the number of 5's, simply divide increasing POWERS OF 5 into 120.

Every multiple of 5 within 120! provides at least one 5:
120/5 = 24 --> 24 5's.
Every multiple of 5² provides a SECOND 5:
120/5² = 4 --> 4 more 5's.
Thus, the total number of 5's contained within 120! = 24+4 = 28.

Note that 121!, 122!, 123!, and 124! all contain the same number of 5's as 120!.

For more than 28 5's to be contained within N!, N must be AT LEAST 125, the next greatest multiple of 5 after 120.
Every multiple of 5 within 125! provides at least one 5:
125/5 = 25 --> 25 5's.
Every multiple of 5² provides a SECOND 5:
125/5² = 5 --> 5 more 5's.
Every multiple of 5³ provides a THIRD 5:
125/5³ = 1 --> 1 more 5.
Thus, the total number of 5's contained within 125! = 25+5+1 = 31.

Note that 126!, 127!, 128!, and 129! all contain the same number of 5's as 125!.
Thanks for the amazing explanation Mitch. I have two follow up questions:
1. You said that number of zeroes in a number depends upon the combination of 2's and 5's. So, would just counting the number of 5's suffice?
2. Applying your approach, if in a situation I have to count the number of zeroes in (for eg. 500!)
then
Multiple of 5 in 500! = 500/5 = 100
Multiple of 5^2 in 500! = 500/25 = 25
Multiple of 5^3 in 500! = 500/125 = 4

Can I conclude that 500! will have (100+25+4) = 129 trailing zeroes?

Thanks
Manik

User avatar
GMAT Instructor
Posts: 15539
Joined: Tue May 25, 2010 12:04 pm
Location: New York, NY
Thanked: 13060 times
Followed by:1906 members
GMAT Score:790

by GMATGuruNY » Wed Nov 04, 2015 3:29 am
manik11 wrote:Thanks for the amazing explanation Mitch. I have two follow up questions:
1. You said that number of zeroes in a number depends upon the combination of 2's and 5's. So, would just counting the number of 5's suffice?

Correct.
2. Applying your approach, if in a situation I have to count the number of zeroes in (for eg. 500!)
then
Multiple of 5 in 500! = 500/5 = 100
Multiple of 5^2 in 500! = 500/25 = 25
Multiple of 5^3 in 500! = 500/125 = 4

Can I conclude that 500! will have (100+25+4) = 129 trailing zeroes?
Your approach is great, but the values in red are incorrect.

Every multiple of 5 within 500! provides at least one 5:
500/5 = 100 --> 100 5's.
Every multiple of 5² provides a SECOND 5:
500/5² = 20 --> 20 more 5's.
Every multiple of 5³ provides a THIRD 5:
500/5³ = 4 --> 4 more 5's.
Thus:
The total number of trailing zeros = 100+20+4 = 124.
Private tutor exclusively for the GMAT and GRE, with over 20 years of experience.
Followed here and elsewhere by over 1900 test-takers.
I have worked with students based in the US, Australia, Taiwan, China, Tajikistan, Kuwait, Saudi Arabia -- a long list of countries.
My students have been admitted to HBS, CBS, Tuck, Yale, Stern, Fuqua -- a long list of top programs.

As a tutor, I don't simply teach you how I would approach problems.
I unlock the best way for YOU to solve problems.

For more information, please email me (Mitch Hunt) at [email protected].
Student Review #1
Student Review #2
Student Review #3