BREAKING: Target Test Prep releases Brand New 2026 On Demand GMAT prep course

Redeem

Target Test Prep · GMAT

Choose how you want to prepare

Learn live with an expert or move at your own pace. Every option includes the complete TTP study system.

★★★★★5.0559 reviews
Vote for Target Test Prep, Newsweek Readers’ Choice Awards 2026
NEWSWEEK READERS’ CHOICE 2026

BIG NEWS! Target Test Prep has been nominated, and they’d love your vote!

TTP has worked incredibly hard to build the best test prep experience possible, and winning Newsweek’s 2026 Readers’ Choice Award for Best Test Prep would mean a lot to them. If TTP has helped you, they’d be incredibly grateful for your vote. You can vote once each day through September 9.

Vote for TTP
GMATLiveTeach 7 seats left
Chris Peckover
NEXT LIVE COHORT

Oct 13 to Jan 7, 2027

with Chris Peckover

Schedule
Tue, Thu · 8:00 to 10:00 PM ET
Included
40 live hours + 6 months of GMAT OnDemand
  • Live instruction and real-time questions
  • Class recordings and assigned practice
View class & enroll
Limited cohort · enrollment openTarget Test Prep
EALiveTeach 5 seats left
Logan Thompson
EXECUTIVE ASSESSMENT

Sep 6 to Dec 6, 2026

with Logan Thompson

Schedule
Sun · 9:30 AM to 12:30 PM ET
Included
40 hours of live online classes plus six months of access to the complete TTP EA OnDemand course.
  • 165+ EA Score Guarantee
  • 4,100+ Quant, Verbal, and Integrated Reasoning practice questions
  • 400+ hours of in-depth video lessons
  • 3,000+ step-by-step video solutions
View EA class & enroll
Limited cohort · enrollment openTarget Test Prep
GMATOnDemand Start anytime
SELF-PACED MASTERCLASS

Target Test Prep GMAT OnDemand

Complete access from day one. Study on your schedule.

715+ score guarantee
$0to start then $127/mo
  • Personalized study plan and analytics
  • Thousands of lessons and practice questions

Compare the format, schedule, and included access before enrolling. Prices and seat counts shown reflect the supplied offer details.

function problem

Expert replies
by akshatgupta87 » Sun Jan 15, 2012 11:31 am
Q) The function g(x) is defined for integers x such that if x is even, g(x) = x/2 and if x is odd, g(x) = x + 5. Given that g(g(g(g(g(x))))) = 19, how many possible values for x would satisfy this equation?
A) 1
B) 5
C) 7
D) 8
E) 11

Someone explain..

~ Thanks,
Akshat
Join the discussion
Source: — Problem Solving |

by Mike@Magoosh » Sun Jan 15, 2012 2:01 pm
Hi, I'm happy to help with this. :)

This is a difficult question. Let's take it one step at a time.

The setup: The function g(x) is defined for integers x such that if x is even, g(x) = x/2 and if x is odd, g(x) = x + 5.

Notice, that g(even) = even/2, which could be even or odd. But g(odd) = odd + 5 = even. Thus, we know, if the output of g(x) is even, it could result from an even or odd input, but if the output is odd, it can only result from an even input.

Start with g(x) = 19. That can only result from g(38) = 19.

Next, g(g(x)) = 19 means that g(x) = 38, which can result from g(76) = 38 or g(33) = 38. In other words, 33 & 76 are the inputs of g(g(x)) that have an output of 19.

Next, g(g(g(x))) = 19 means g(g(x)) = 38, which means g(x) = 76 or g(x) = 33. The former can result from g(152) = 76 or from g(71) = 76. The latter can result only from g(28) = 33. In other words, 28 & 71 & 152 are the inputs of g(g(g(x))) that have an output of 19.

Next, g(g(g(g(x)))) = 19 means g(g(g(x))) = 38, which means g(g(x)) = 76 or g(g(x)) = 33, which means g(x) equals either 28 or 71 or 152. We can get 28 from g(56) = 28 or g(23) = 28. We can get 71 only from g(142) = 71. We can get 152 either from g(147) = 152 or g(304) = 152. These five numbers, 23 or 56 or 142 or 147 or 304, are the five possible inputs of g(g(g(g(x)))) that have an output of 19.

Next, if g(g(g(g(g(x))))) = 19, this means
g(g(g(g(x)))) = 38, which means
g(g(g(x))) = 76 or 33, which means
g(g(x)) = 28 or 71 or 152, which means
g(x) = 23 or 56 or 142 or 147 or 304

We can get g(x) = 23 only from g(18) = 23.
We can get g(x) = 56 from either g(112) = 56 or g(51) = 56
We can get g(x) = 142 from either g(284) = 142 or g(137) = 142
We can get g(x) = 147 only from g(294) = 147
We can get g(x) = 304 from either g(608) = 304 or from g(299) = 304.

Any of those 8 bold values are inputs that will give g(g(g(g(g(x))))) an output of 19. Eight possibilities. The answer is D.

Incidentally, it's no coincidence that the number of possibilities at each state (1, 2, 3, 5, 8) was following the Fibonacci sequence. In fact, that's determined by the initial conditions.

Does that make sense? Please let me know if you have any questions on what I've said here.

Mike :)
Magoosh GMAT Instructor
https://gmat.magoosh.com/
Join the discussion

by pemdas » Sun Jan 15, 2012 2:11 pm
these five functions can be defined such a way that x with even multiplier (by 2) may be assigned five values and the odd values (added by 5) may be max. only three, even+odd=odd and odd+odd=even. As 19 cannot be x+5, since x will be 14 then (14 is even) we start from even in the first function.
in total 5 even and three odd values for x

d

akshatgupta87 wrote:Q) The function g(x) is defined for integers x such that if x is even, g(x) = x/2 and if x is odd, g(x) = x + 5. Given that g(g(g(g(g(x))))) = 19, how many possible values for x would satisfy this equation?
A) 1
B) 5
C) 7
D) 8
E) 11

Someone explain..

~ Thanks,
Akshat
Success doesn't come overnight!
Join the discussion

by [email protected] » Sun Jan 15, 2012 6:46 pm
The simple way to tackle this problem is to apply reverse engineering,until we find a definite pattern.

Given g(x) = 19, we can consider which operation applied to (x). If it was x/2, then (x)= 38. 38 is even so this can be the case. If it was x + 5, then (x) was 14. 14 is even, so this operation would not have been applied.
We can make a tree, with 19 as the root, and 38 as the first child.
Next consider 38. 38 could have resulted from 76/2 or 33 + 5. Two choices give us two children of 38:

19 -> 38 -> 76, 33.

We can now observe the pattern that with an odd number, it must have come from an even, but an even could come from either of two numbers.

Therefore our 76 will branch into 2 numbers, and the 33 into just one.
33 -> 66
76 -> 73, 152..
19
|
38
/ \
33 76
| | \
E E O
/ \ /\ |
E O E O E
/ \ | /\ | /\
E 0 E EO E E O

counting the node at the lowest level give us 8 choices
Join the discussion

by ronnie1985 » Sun Jan 15, 2012 7:48 pm
This is a lengthy question. There shall be 2 x's for each g(x), one odd and other even. Since for odd+odd = even, 19 = 38/2, all the even outcomes are because of summation with 5
Make a tree diagram starting with 19 to obtain the no of possible inputs as
Attachments
Solution.pdf
Solution
(12.99 KiB) Downloaded 137 times
Follow your passion, Success as perceived by others shall follow you
Join the discussion

by ronnie1985 » Sun Jan 15, 2012 7:49 pm
Answer is 5 - (B)
Follow your passion, Success as perceived by others shall follow you
Join the discussion

by pappueshwar » Sun Feb 05, 2012 6:54 pm
hi guha,

in the example that u have given, the tree form is a good way to understand. but how did u stop at the lowest node? i mean why cant the anwser go on a step further?

is it becoz the answer choice is limited to number 8 ?
Join the discussion

by [email protected] » Sun Feb 05, 2012 7:17 pm
pappueshwar wrote:hi guha,

in the example that u have given, the tree form is a good way to understand. but how did u stop at the lowest node? i mean why cant the anwser go on a step further?

is it becoz the answer choice is limited to number 8 ?
It was given that g(g(g(g(g(x))))) = 19, SO there is total 5 operation that we need to perform, hence the depth of tree=5.
Join the discussion