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
GMATLiveTeach Starts Oct 17
Chris Peckover, Target Test Prep GMAT expert
LIVE ONLINE CLASSES

Get Ready for GMAT Test Day Faster with Live Online Classes

with Chris Peckover, 100th-Percentile GMAT Scorer

Oct 17 · Chris Peckover
Sat · 11:00 AM to 2:00 PM ET
Oct 20 · Chris Peckover
Tue, Thu · 8:00 to 10:00 PM ET
Oct 25 · Josh Braslow
Sun · 1:00 to 4:00 PM ET
Included
40 hours of live online classes + 6 months of TTP OnDemand
  • Attend the first class for free
  • Every class is recorded, so you never fall behind
View classes & enroll
Limited seats availableTarget Test Prep
EALiveTeachOnDemand 5 seats left Start anytime
EXECUTIVE ASSESSMENT

Target Test Prep EA OnDemand

Self-paced EA prep. Study on your schedule.

Logan Thompson
EXECUTIVE ASSESSMENT

Sep 6 to Dec 6, 2026

with Logan Thompson

165+ EA score guarantee
$05-day trial no automatic billing
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 Start free 5-day trial
Limited cohort · enrollment openTrial includes full course accessTarget 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 + prime

Expert replies
by scmetzger » Mon May 25, 2009 11:41 am
Can anybody explain how I get this answer:

The function f is defined for all positive integers n by the following rule: f(n) is the number of positive integers each of which is less than n and has no positive factor in common with n other than 1. If p is any prime number then f(p)=?

The answer is: p-1


Thanks for your help.
Join the discussion
Source: — Problem Solving |

Re: function + prime

by dtweah » Mon May 25, 2009 2:00 pm
scmetzger wrote:Can anybody explain how I get this answer:

The function f is defined for all positive integers n by the following rule: f(n) is the number of positive integers each of which is less than n and has no positive factor in common with n other than 1. If p is any prime number then f(p)=?

The answer is: p-1


Thanks for your help.
f(1)=0
f(2)=1
f(3)=2
f(4)=3
....
f(n)=n-1

Hence f(p)=p-1

The point is that the series will alternate between odd and even numbers so the only common factor will be any consecutive terms of the series will be 1. 3 is prime above and gives 3-1=2
Join the discussion

by Ian Stewart » Mon May 25, 2009 8:30 pm
f(n) does not equal n-1 in general here; it's important that the number in the question is prime.

The definition in the question is quite abstract - if you can make sense of it, however, you should have a good chance of answering the question. We're told: "f(n) is the number of positive integers each of which is less than n and has no positive factor in common with n other than 1."

So to first take an example that isn't relevant to the question, let's figure out what f(6) is. We first need to look at all of the positive integers which are less than 6 -- 1, 2, 3, 4 and 5 -- and decide which of these 'has no positive factor in common with 6 other than 1'. So we want to count how many of these numbers do *not* share a divisor larger than 1 with 6 - i.e. how many of these numbers are not divisible by 2, 3 or 6. We can rule out 2, 3 and 4, but not 1 or 5, so f(6) = 2. (you might notice that we're simply counting all the numbers n < 6 for which the GCD of n and 6 is equal to 1).

If, however, you take any prime number, as they ask us to do in this question -- perhaps take p=7 for example -- we then want to count how many of these numbers -- 1, 2, 3, 4, 5, 6 -- do not have a divisor larger than one in common with 7. Of course, all of them do not share such a divisor with 7, because 7 is prime, so f(7) = 6. The same will be true for any prime p; f(p) = p-1.
For online GMAT math tutoring, or to buy my higher-level Quant books and problem sets, contact me at ianstewartgmat at gmail.com

ianstewartgmat.com
Join the discussion