MHB How to find whether a given number is prime or not?

  • Thread starter Thread starter burgess
  • Start date Start date
  • Tags Tags
    Prime
burgess
Messages
23
Reaction score
0
What is a prime number

A number is greater than 1 is called a prime number, if it has only two factors, namely 1 and the number itself.

Prime numbers up to 100 are:2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97

Procedure to find out the prime number

Suppose A is given number.

Step 1: Find a whole number nearly greater than the square root of A. K > square root(A)
Step 2: Test whether A is divisible by any prime number less than K. If yes A is not a prime number. If not, A is prime number.

Example:

Find out whether 337 is a prime number or not?

Step 1: 19 > square root (337)
Prime numbers less than 19 are 2, 3, 5, 7, 11, 13, 17
Step 2: 337 is not divisible by any of them

Therefore 337 is a prime number

These are simple and easy tricks which are helpful to solve your math homework problems .
 
Mathematics news on Phys.org
Great summary! There are several other ways of determining if a given number is prime in addition to your method.

This article from Geeks for Geeks implements some algorithms in C++, Java, Python, C#, PHP, and Javascript because sometimes when you're developing an application you need to do this.

https://www.geeksforgeeks.org/prime-numbers/

and this article from Wikihow brings in several other schemes including Fermat's Little Theorem and Miller-Rabin test which dramatically speeds up the testing process but have pitfalls in identifying a number as prime when it is not aka false positive.

https://www.wikihow.com/Check-if-a-Number-Is-Prime
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
I'm interested to know whether the equation $$1 = 2 - \frac{1}{2 - \frac{1}{2 - \cdots}}$$ is true or not. It can be shown easily that if the continued fraction converges, it cannot converge to anything else than 1. It seems that if the continued fraction converges, the convergence is very slow. The apparent slowness of the convergence makes it difficult to estimate the presence of true convergence numerically. At the moment I don't know whether this converges or not.

Similar threads

Replies
3
Views
964
Replies
24
Views
2K
Replies
7
Views
2K
Replies
19
Views
3K
Replies
2
Views
8K
Back
Top