Determining Prime Numbers: Tips & Tricks

Click For Summary

Discussion Overview

The discussion centers around methods for determining whether a number is prime, particularly for larger numbers beyond 100. Participants share various techniques, tips, and tricks for primality testing, especially in the context of preparing for exams.

Discussion Character

  • Exploratory
  • Technical explanation
  • Homework-related

Main Points Raised

  • One participant seeks efficient methods for determining if larger numbers are prime, mentioning a specific experience with the number 151.
  • Another participant suggests using trial division up to the square root of the number, recommending specific primes to check against.
  • A participant highlights a trick for checking divisibility by 11 but questions the existence of similar tricks for 7, 13, 17, and 19.
  • Some participants discuss the efficiency of mental arithmetic and suggest that improving this skill could reduce the time taken to determine primality.
  • One participant introduces the 1001 trick, which is useful for larger numbers, explaining its basis in modular arithmetic.
  • A suggestion is made to use the Sieve of Eratosthenes as a fundamental method for finding prime numbers, detailing the steps involved in the process.

Areas of Agreement / Disagreement

Participants express varying opinions on the effectiveness of different techniques for primality testing. While some agree on the utility of trial division and the Sieve of Eratosthenes, others question the practicality of certain tricks and emphasize the importance of mental arithmetic skills. No consensus is reached on the best method for determining primality.

Contextual Notes

Some participants mention the need for practice in mental arithmetic and the potential limitations of certain tricks for specific numbers. The discussion reflects a range of experiences and approaches without resolving the effectiveness of each method.

Who May Find This Useful

Students preparing for mathematics exams, individuals interested in number theory, and those looking to improve their skills in primality testing may find this discussion beneficial.

Haunted Physt
Messages
5
Reaction score
0
Hello,

This is my first post. Anyways, from the beginning, since I started learning the subjects at higher level, I have faced this problem -

How to determine if the nos. is a prime no. ?

The numbers under 100 are known to me, but if a bigger digit comes, are there any tricks to determining whether it is a prime no. or not? In one of my previous exams, I had found myself in trouble with just this small no. 151 ... :eek: and yeah, I found that it was prime within minutes, but I always try to divide the number by 7, 13, 17, and 19 to determine whether it is a prime or not. But this is just trial and error, so, could anybody, any mathgenius disclose me the trick? Require it badly for the upcoming exams - 1 day to go!

Currently I am in XIth Grade.
 
Mathematics news on Phys.org
If you're in 11th grade, and you're doing this for an exam, stick to trial division. Remember that you only have to check up to the square root of the number. So even up to 200 you'd only have to try 2, 3, 5, 7, 11, 13, 17 and 19. Furthermore, you shouldn't have difficulty (i.e. takes only a few seconds) with 2, 3, 5. There is a trick with 11: http://www.jimloy.com/number/divis.htm For 7, 13, 17 and 19 you'll just have to stick to division. Nevertheless, it shouldn't take more a minute each (if you're taking longer, practise your division!)

In general, primality testing is one of those big number theory problems. In fact, if you're feeling up to it, learning about all the different methods will take you right to the forefront of number theory. However, all these methods are intended for numbers far bigger than you can (or want to) write down, and are suited for computers rather than humans.
 
Last edited by a moderator:
The one of 11 is a really nice trick! Though, 7's rather a large trick. Aren't there any for the other numbers, 13, 17, and 19?
 
Not to my knowledge. Personally, I've never used the one for 7 -- it seems so much quicker to just divide.
 
151 within minutes? Surely you mean within seconds: 2,3,5, clearly not. 7 doesn't divide 11, and hence doesn't divide 151. 11 doesn't divide it either, as we can see by the trick, or just thinking about it - 11 does divide 132 and not 19... And 13^2=169. If it took you more than 2 seconds, then this tells you not that you need more techniques, but that you just need to work on your mental arithmetic.
 
There's the 1001 trick as well, but that's really useful only for larger numbers. (1001 = 7 * 11 * 13, so subtracting 1001 leaves a number unchanged mod each of those, but it's easy to subtract multiples of 1001.)
 
matt grime said:
151 within minutes? Surely you mean within seconds: 2,3,5, clearly not. 7 doesn't divide 11, and hence doesn't divide 151. 11 doesn't divide it either, as we can see by the trick, or just thinking about it - 11 does divide 132 and not 19... And 13^2=169. If it took you more than 2 seconds, then this tells you not that you need more techniques, but that you just need to work on your mental arithmetic.

Well, I actually meant within seconds, but you are true. So any tips to working on Mental Arithmatic? Its really weak if I see that way...my Maths is to be improved!
 
Haunted Physt, you want the Sieve of Eratosthenes. Great and fundamental exercise for finding prime numbers. Try an internet search. Also, your elementary school textbooks in arithmetic should discuss this.

List numbers in rows of 10; go from 1 to 200 (or whatever upper limit you want).
Put X on 1; put circle around 2;
Put X on all multiples of 2, but not on 2 itself.
Come back to the lowest unmarked number and put circle around it;
Put X on all multiples of this number.
Come back to the lowest unmarked number and put circle around it;
Continue in this manner until all of the numbers are marked.

The circled numbers are the prime numbers; the numbers with X (except 1) are all "composite" numbers.
 
...Actually when I said "list the numbers...", I meant rows like 1 to 10, 11 to 20, 21 to 30... like that. You want a chart, not simply a running list, but a chart with rows of ten elements long.
 

Similar threads

  • · Replies 24 ·
Replies
24
Views
3K
  • · Replies 2 ·
Replies
2
Views
9K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
7
Views
4K
  • · Replies 20 ·
Replies
20
Views
4K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K