Prime Number

Problem Solving — algebra and arithmetic (GMAT Focus Edition)
This topic has expert replies
Senior | Next Rank: 100 Posts
Posts: 63
Joined: Mon Jul 20, 2009 11:48 am
GMAT Score:730

Prime Number

by rainmaker » Mon Feb 08, 2010 10:21 am
Hi all,

What is the fastest way to determine if a number is prime? I see some questions in which you need to check if a number is prime or not. The problem is sometimes the number is a huge number.

Thanks
Source: — Quantitative Reasoning |

User avatar
Legendary Member
Posts: 1132
Joined: Mon Jul 20, 2009 3:38 am
Location: India
Thanked: 64 times
Followed by:6 members
GMAT Score:760

by harsh.champ » Mon Feb 08, 2010 10:49 am
rainmaker wrote:Hi all,

What is the fastest way to determine if a number is prime? I see some questions in which you need to check if a number is prime or not. The problem is sometimes the number is a huge number.

Thanks
Basically,you have to memorize some divisibility rules of prime no.s .
1:check if even or not.[divisible by 2]
2:check if sum of digits is divisible by 3. [ divisible by 3]
3:check if the no. ends with a 5 or 0. [divisible by 5]

Similarly,you have to remember the rules for 7,11,13,17,19 which can be quite complicated.

I think this link will help you:- https://en.wikipedia.org/wiki/Divisibility_rule
Just keep in mind that you learn them.
[Personally I don't think you will need to know for above than 19 e.g:-23,29 etc.]

Further ,if you have any doubt you can post in this thread afterwards.

:P
It takes time and effort to explain, so if my comment helped you please press Thanks button :)



Just because something is hard doesn't mean you shouldn't try,it means you should just try harder.

"Keep Walking" - Johnny Walker :P

User avatar
Legendary Member
Posts: 2109
Joined: Sun Apr 19, 2009 10:25 pm
Location: New Jersey
Thanked: 109 times
Followed by:79 members
GMAT Score:640

by money9111 » Mon Feb 08, 2010 12:56 pm
yeah the divisibilities rules come in handy when trying to figure this out. if you memorize them, you'll be able to tell quite quickly whether or not a number is prime... MGMAT number properties book will serve you well because it speaks to other cases where knowing primes/divisibility rules are helpful
My goal is to make MBA applicants take onus over their process.

My story from Pre-MBA to Cornell MBA - New Post in Pre-MBA blog

Me featured on Poets & Quants

Free Book for MBA Applicants


User avatar
Master | Next Rank: 500 Posts
Posts: 109
Joined: Mon Oct 12, 2009 4:58 am
Thanked: 12 times
Followed by:1 members
GMAT Score:720

by jeffedwards » Mon Feb 08, 2010 5:46 pm
I found a good one from the study cards that used to be free on this site. Basically what it says is

"¢ You start with the smallest prime number and see if it's a factor.
"¢ You continue until you find a number that's a factor (in which case it's not a prime), or you reach a prime number that is ≥ the square root of the number you are testing (in which case it is a prime)

Additionally, I found a great link (https://bit.ly/blmqtA) to quickly figure out square roots

I memorized the first 100; that has helped with most problems.

User avatar
Legendary Member
Posts: 2109
Joined: Sun Apr 19, 2009 10:25 pm
Location: New Jersey
Thanked: 109 times
Followed by:79 members
GMAT Score:640

by money9111 » Mon Feb 08, 2010 8:55 pm
jeffedwards I'm not seeing where the squares are listed in the link you gave... where should I click?
My goal is to make MBA applicants take onus over their process.

My story from Pre-MBA to Cornell MBA - New Post in Pre-MBA blog

Me featured on Poets & Quants

Free Book for MBA Applicants


User avatar
Legendary Member
Posts: 1560
Joined: Tue Nov 17, 2009 2:38 am
Thanked: 137 times
Followed by:5 members

by thephoenix » Tue Feb 09, 2010 2:27 am
rainmaker wrote:Hi all,

What is the fastest way to determine if a number is prime? I see some questions in which you need to check if a number is prime or not. The problem is sometimes the number is a huge number.

Thanks
for GMAT quickest way is tofind the nearest square root of the no. and then check div by all prime no's less than the square root of the number

in GMAT u will get more than 2 digit no.
for eg to check for 79
9^2=81 and 8^2=64
hence we need to check whether 79 is div by2,3,5,7 if yes than its not a prime no if no than its a prime no.
here its not and hence its a prime no...

HTH

User avatar
Master | Next Rank: 500 Posts
Posts: 109
Joined: Mon Oct 12, 2009 4:58 am
Thanked: 12 times
Followed by:1 members
GMAT Score:720

by jeffedwards » Tue Feb 09, 2010 8:32 am
money9111 wrote:jeffedwards I'm not seeing where the squares are listed in the link you gave... where should I click?
Sorry, I may not have been clear. It's not a list, the article just explains another method to find the square root of a number. I thought it was a nice little trick.

Senior | Next Rank: 100 Posts
Posts: 63
Joined: Mon Jul 20, 2009 11:48 am
GMAT Score:730

by rainmaker » Tue Feb 09, 2010 9:57 am
Thanks Guys!

Jeff, thanks for the link.

User avatar
Legendary Member
Posts: 2109
Joined: Sun Apr 19, 2009 10:25 pm
Location: New Jersey
Thanked: 109 times
Followed by:79 members
GMAT Score:640

by money9111 » Wed Feb 10, 2010 12:10 pm
jeffedwards - aaahhh ok i get it now... thanks

thephoenix - thank you for the explanation! gotta remember this... therefore it's going in my notecards
My goal is to make MBA applicants take onus over their process.

My story from Pre-MBA to Cornell MBA - New Post in Pre-MBA blog

Me featured on Poets & Quants

Free Book for MBA Applicants


Senior | Next Rank: 100 Posts
Posts: 84
Joined: Sat Oct 03, 2009 1:13 pm
Thanked: 11 times

by djkvakin » Thu Feb 11, 2010 3:04 pm
Here is a quick way to see if the number is divisible by 7:
To find out if a number is divisible by seven, take the last digit, double it, and subtract it from the rest of the number.
Example: If you had 203, you would double the last digit to get six, and subtract that from 20 to get 14. If you get an answer divisible by 7 (including zero), then the original number is divisible by seven. If you don't know the new number's divisibility, you can apply the rule again.

Senior | Next Rank: 100 Posts
Posts: 84
Joined: Sat Oct 03, 2009 1:13 pm
Thanked: 11 times

User avatar
Legendary Member
Posts: 1132
Joined: Mon Jul 20, 2009 3:38 am
Location: India
Thanked: 64 times
Followed by:6 members
GMAT Score:760

by harsh.champ » Thu Feb 18, 2010 10:54 am
Thanks djkvakin for the link.
The link in wikipedia(given by me above) only lists the division methods and where you can memorize them.
Over here ,the explanation is given in details by Dr.Rob,Sara and many others which helps us to strengthen our concepts.
Though I would say for the exam-day it is better only to learn a few divisibility rules as going too much in-depth can get confusing as we also have numerous geometry properties to remember.What-say??

For understanding purposes,no doubt that the link is very beneficial.
It takes time and effort to explain, so if my comment helped you please press Thanks button :)



Just because something is hard doesn't mean you shouldn't try,it means you should just try harder.

"Keep Walking" - Johnny Walker :P

User avatar
Legendary Member
Posts: 1275
Joined: Thu Sep 21, 2006 11:13 pm
Location: Arabian Sea
Thanked: 125 times
Followed by:2 members

by ajith » Thu Feb 18, 2010 1:17 pm
harsh.champ wrote:
Thanks djkvakin for the link.
The link in wikipedia(given by me above) only lists the division methods and where you can memorize them.
Over here ,the explanation is given in details by Dr.Rob,Sara and many others which helps us to strengthen our concepts.
Though I would say for the exam-day it is better only to learn a few divisibility rules as going too much in-depth can get confusing as we also have numerous geometry properties to remember.What-say??

For understanding purposes,no doubt that the link is very beneficial.
Well Depends on your brain's capacity. Whatever works fine with you do that, if you can remember 100 numbers with no pattern it works well. If you can master Eratosthenes Sieve do that. If you are good at division go upto sqrt of n and check that. If you say divisibility rules help, probably try that out. Some people may like Vedic maths and it would help.

I would say whatever suits you do that but, never ever try to cheat.
Always borrow money from a pessimist, he doesn't expect to be paid back.

User avatar
Legendary Member
Posts: 1022
Joined: Mon Jul 20, 2009 11:49 pm
Location: Gandhinagar
Thanked: 41 times
Followed by:2 members

by shashank.ism » Fri Feb 19, 2010 2:24 am
Well overall it comes to memorizing which will help you in real exam. If you need outside exam or to make a sheet of all the prime numbers. Just try my small programming you can check any number whether its prime or not..
https://shashankmadhukar.byethost5.com/t ... umber.html
My Websites:
www.mba.webmaggu.com - India's social Network for MBA Aspirants

www.deal.webmaggu.com -India's online discount, coupon, free stuff informer.

www.dictionary.webmaggu.com - A compact free online dictionary with images.

Nothing is Impossible, even Impossible says I'm possible.