What is a prime number?
A prime number (or prime integer, commonly referred to as a “prime” for short) is a positive integer p>1 with no divisors other than 1 and p itself. In other words, a prime number p is a positive integer that has exactly one positive divisor other than 1, indicating that it cannot be factored. For instance, 13 has just two divisors: 1 and 13, making it a prime number. Composite numbers are positive integers other than 1 that are not prime. While the word “prime number” is most usually used to refer to prime positive integers, other forms of primes, such as Gaussian primes, are also described.
History of a prime number
Euclid proposed the prime number theorem, which states that there are an infinite number of prime numbers.
Do you have an exhaustive list of prime numbers ranging from one to one hundred? Have you double-checked each number to see if it is divisible by the smaller ones? Then you’ve undoubtedly put in a lot of time and effort. Eratosthenes, a renowned scientist who lived a few centuries after Euclid, devised an ingenious method for calculating all prime numbers up to a specific integer. This procedure is known as the Eratosthenes Sieve. If you need to find prime numbers up to n, we’ll create a list of all numbers from 2 to n. All multiples of 2 other than 2 will be removed from the list, beginning with the smallest prime number, p = 2.
List of prime numbers
LIST OF NUMBERS | PRIME NUMBERS |
Between 1 and 10 | 2, 3, 5, 7 |
Between 11 and 20 | 11, 13, 17, 19 |
Between 21 and 30 | 23, 29 |
Between 31 and 40 | 31, 37 |
Between 41 and 50 | 41, 43, 47 |
Between 51 and 100 | 53, 59, 61, 67, 71, 73, 79, 83, 89, 97 |
Properties of Prime Numbers
- A prime number is one that is greater than or equal to one.
- It consists of only two elements: 1 and the number itself.
- There is only one even prime number, which is 2.
- Any two prime numbers are always coprime to each other.
- Any integer can be expressed using the product of prime numbers.
How to determine if a number is prime using a computer algorithm?
Extremely big numbers can be tested to check if they are prime using a computer. However, because there is no limit to how huge a natural number may be, testing in this manner will always become too difficult — even for the most powerful supercomputers. In December of 2018, for example, the greatest known prime number was 24,862,048 digits.
In order to produce ever-larger prime numbers, many techniques have been devised. Consider the case when “n” is a whole number and it is unknown whether n is prime or composite.
Take n’s square root (or 1/2 power), then round it up to the next greatest whole number and call it m. Then find all of the quotients below:
qm = n / m
q(m-1) = n / q(m-1)
q(m-2) = n / (m-2) q(m-3)
q3 = n / 3
q2 = n / 2
If and only if none of the q’s generated above are whole numbers, then the integer n is prime.