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 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
Live EA class + 6 months of EA OnDemand
  • Expert-led weekly online sessions
  • EA Masterclass access between classes
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.

130-point 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.

Checking Prime status of a number

Expert replies
by goelmohit2002 » Sun Aug 02, 2009 12:43 pm
Hi All,

I read somewhere that the method to use is as below. Can someone please tell what is the reasoning behind checking the divisibility only till square root of number n...as highlighted in point#4 below? Why not check the same till n/2 ?



============================================
1. Pick a number n.
2. Start with the least prime number, 2. See if 2 is a factor
of your number. If it is, your number is not prime.
3. If 2 is not a factor, check to see if the next prime, 3, is a factor. If it
is, your number is not prime.
4. Keep trying the next prime number until you reach one that is a
factor (in which case n is not prime), or you reach a prime
number that is equal to or greater than the square root of n.

5. If you have not found a number less than or equal to the square
root of n, you can be sure that your number is prime.
==============================================

Thanks
Mohit
Join the discussion
Source: — Problem Solving |

by zenithexe » Sun Aug 02, 2009 6:30 pm
try to go through the rule by using already known prime numbers

eg if n=17,

17/2=not divisible
17/3=not divisible
17/5=not divisible
17/7=not divisible
17/11=not divisible
17/11=not divisible

can you tell that steps after 17/3 are redundant?
as you know sqrt(17) is just little over 4 (as sqrt(16)=4)

Steps after sqrt(n) are redundant because;

n can written this way

n=x*y
as x increases, y must decrease to maintain n,
for example

if n=16
n=16*1, 8*2, 4*4, 2*8, 1*16
as you can see, 16*1 and 1*8 repeats
so steps after 4*4 (ie, sqrt(n)) are not necessary


hmm, I hope this makes sense
Join the discussion

by goelmohit2002 » Mon Aug 03, 2009 10:16 am
zenithexe wrote:try to go through the rule by using already known prime numbers

eg if n=17,

17/2=not divisible
17/3=not divisible
17/5=not divisible
17/7=not divisible
17/11=not divisible
17/11=not divisible

can you tell that steps after 17/3 are redundant?
as you know sqrt(17) is just little over 4 (as sqrt(16)=4)

Steps after sqrt(n) are redundant because;

n can written this way

n=x*y
as x increases, y must decrease to maintain n,
for example

if n=16
n=16*1, 8*2, 4*4, 2*8, 1*16
as you can see, 16*1 and 1*8 repeats
so steps after 4*4 (ie, sqrt(n)) are not necessary


hmm, I hope this makes sense
Thanks.....but can you please tell for what reason we should not check the divisibility by 5, 7 ?

They too are prime numbers....and greater then 4....

what is the reason why we stop after checking till 4 ?
Join the discussion

by quant-master » Mon Aug 03, 2009 11:02 am
Hi,

I guess you posted this in Test-Magic forum as well, not sure though. Well here is my explanation. (Its same as what I posted there :P )

Anyways here we go,

To understand this you need to understand the concepts of factor.
Every number is made up of factors and for each factor there is factor-pair. For example lets take the number 18

18 is made of one two and two 3s.

factors of 18 can be expressed as below

1-----18
2------9
3------6

In the above representation (1,18),(2,9) and (3,6) are factor-pairs. When you multiply the factor pairs it will lead to the original number itself, in this case it's 18.

Generally for a number N, N2 will have k factors less than N and k factors more than N. Now lets come to the root of your question. Let N2 be a square of a number say N. Than there will be k factors less than N and k factors more than N.

For example let's take the square of a a number 6 which is 36. Now its factors are 1,2,3,4,6,9,12,18,36. Now if you notice there are 4 factors less than 6 and 4 factors more than 6 and for every factor less than 6 there is a factor pair which is more than 6.

Now if you take a prime number P there must be k factors less than square root of P and k factors more than square root of P. Since prime number will have only 1 and P as its factors there is no factor apart from 1 which is less than square root of P, this means that there can't be any factor more than square root of P as this will violate factor-pair concept. Hence you need not check for the prime numbers which is more than square root of P

Hope I am clear.

This was supposed to be my next concept thread in my blog :D

Thanks,
Quant-Master
https://gmat-quants.blocked - My Blog Updated almost daily with new quant fundas. Find collection of quants question in my blog
Join the discussion