Prime Numbers

What Is a Prime Number?

A prime number is any natural number (counting number) that is greater than 1 and is divisible only by 1 and itself. Examples of prime numbers - 2\hspace{0.2em} 2 \hspace{0.2em}, 3\hspace{0.2em} 3 \hspace{0.2em}, 5\hspace{0.2em} 5 \hspace{0.2em}, 7\hspace{0.2em} 7 \hspace{0.2em}, 11\hspace{0.2em} 11 \hspace{0.2em}, 13\hspace{0.2em} 13 \hspace{0.2em}, 17\hspace{0.2em} 17 \hspace{0.2em}, etc.

So, a prime number has only two positive factors1\hspace{0.2em} 1 \hspace{0.2em} and itself. And this is the property that makes prime numbers so special. More on that later.

What Is a Composite Number?

Counting numbers that have more than two positive factors are known as composite numbers. As such, they can be expressed as a product of smaller factors. For example, 4\hspace{0.2em} 4 \hspace{0.2em}, 10\hspace{0.2em} 10 \hspace{0.2em}, 15\hspace{0.2em} 15 \hspace{0.2em}, etc.

So basically every natural number greater than 1\hspace{0.2em} 1 \hspace{0.2em} is either prime or composite - but never both. 1\hspace{0.2em} 1 \hspace{0.2em} is neither prime nor composite.

What Are the Prime Numbers From 1 to 100?

If you want to be good at math, you have to be good with numbers. And being able to quickly identify whether a number is prime or not is one of the things that help you be great with numbers.

There are a total of 25\hspace{0.2em} 25 \hspace{0.2em} prime numbers between 1\hspace{0.2em} 1 \hspace{0.2em} and 100\hspace{0.2em} 100 \hspace{0.2em}. Make sure you familiarize yourself with each of them.

Prime numbers up to 100

So the prime numbers up to 100\hspace{0.2em} 100 \hspace{0.2em} are -

2\hspace{0.2em} 2 \hspace{0.2em}, 3\hspace{0.2em} 3 \hspace{0.2em}, 5\hspace{0.2em} 5 \hspace{0.2em}, 7\hspace{0.2em} 7 \hspace{0.2em}, 11\hspace{0.2em} 11 \hspace{0.2em}, 13\hspace{0.2em} 13 \hspace{0.2em}, 17\hspace{0.2em} 17 \hspace{0.2em}, 19\hspace{0.2em} 19 \hspace{0.2em}, 23\hspace{0.2em} 23 \hspace{0.2em}, 29\hspace{0.2em} 29 \hspace{0.2em}, 31\hspace{0.2em} 31 \hspace{0.2em}, 37\hspace{0.2em} 37 \hspace{0.2em}, 41\hspace{0.2em} 41 \hspace{0.2em}, 43\hspace{0.2em} 43 \hspace{0.2em}, 47\hspace{0.2em} 47 \hspace{0.2em}, 53\hspace{0.2em} 53 \hspace{0.2em}, 59\hspace{0.2em} 59 \hspace{0.2em}, 61\hspace{0.2em} 61 \hspace{0.2em}, 67\hspace{0.2em} 67 \hspace{0.2em}, 71\hspace{0.2em} 71 \hspace{0.2em}, 73\hspace{0.2em} 73 \hspace{0.2em}, 79\hspace{0.2em} 79 \hspace{0.2em}, 83\hspace{0.2em} 83 \hspace{0.2em}, 89\hspace{0.2em} 89 \hspace{0.2em}, and 97\hspace{0.2em} 97 \hspace{0.2em}.

How to Tell If a Number Is Prime?

Now, of course, you can't memorize all of the prime numbers. There are infinitely many of them. So wouldn't it be great if there was a simple way of checking whether a number is prime or not? Well, there is!

Let me explain with an example.

Is 97\hspace{0.2em} 97 \hspace{0.2em} a prime number?

Here's how you find out if a number is prime.

Step 1.  Make sure it is a counting number greater than 1\hspace{0.2em} 1 \hspace{0.2em}. And that it isn't a perfect square. Or else, the number cannot be prime.

97\hspace{0.2em} 97 \hspace{0.2em} passes this test.

Step 2.  Think of the largest number whose square is less than the given number.

is 100\hspace{0.2em} 100 \hspace{0.2em} (more than 97\hspace{0.2em} 97 \hspace{0.2em}).

Step 3.  List the prime numbers up to the number found in the previous step.

Prime numbers up to 9\hspace{0.2em} 9 \hspace{0.2em} are - 2\hspace{0.2em} 2 \hspace{0.2em}, 3\hspace{0.2em} 3 \hspace{0.2em}, 5\hspace{0.2em} 5 \hspace{0.2em}, and 7\hspace{0.2em} 7 \hspace{0.2em}.

Step 4.  Is the given number divisible by any of the prime numbers from the step above? If yes, the number isn't prime. If not, it is prime.

97 isn't divisible by 2\hspace{0.2em} 2 \hspace{0.2em}, 3\hspace{0.2em} 3 \hspace{0.2em}, 5\hspace{0.2em} 5 \hspace{0.2em}, or 7\hspace{0.2em} 7 \hspace{0.2em}. Hence, 97\hspace{0.2em} 97 \hspace{0.2em} is prime.

Yay!

I know. It appears like too many steps with a lot to do. But give yourself some time and practice. And you'll see it's much simpler than it looks. More so, if you know the common divisibility rules and the square of numbers up to 20\hspace{0.2em} 20 \hspace{0.2em}.

Any number with two or more digits whose rightmost digit is 0\hspace{0.2em} 0 \hspace{0.2em}, 2\hspace{0.2em} 2 \hspace{0.2em}, 4\hspace{0.2em} 4 \hspace{0.2em}, 6\hspace{0.2em} 6 \hspace{0.2em}, 8\hspace{0.2em} 8 \hspace{0.2em}, or 5\hspace{0.2em} 5 \hspace{0.2em} cannot be prime. Reason? It will certainly be divisible by 2\hspace{0.2em} 2 \hspace{0.2em} or 5\hspace{0.2em} 5 \hspace{0.2em}. For example - 74\hspace{0.2em} 74 \hspace{0.2em}, 130\hspace{0.2em} 130 \hspace{0.2em}, 375\hspace{0.2em} 375 \hspace{0.2em}, etc.

Example

Is 141\hspace{0.2em} 141 \hspace{0.2em} a prime number?

Solution

Step 1.  141\hspace{0.2em} 141 \hspace{0.2em} is a counting number greater than 1\hspace{0.2em} 1 \hspace{0.2em} and it isn't a perfect square. So we can move to the next step.

Step 2.  The largest number whose square is less than 141\hspace{0.2em} 141 \hspace{0.2em} is 11\hspace{0.2em} 11 \hspace{0.2em}.

Step 3.  The prime numbers up to 11\hspace{0.2em} 11 \hspace{0.2em} are 2\hspace{0.2em} 2 \hspace{0.2em}, 3\hspace{0.2em} 3 \hspace{0.2em}, 5\hspace{0.2em} 5 \hspace{0.2em}, 7\hspace{0.2em} 7 \hspace{0.2em}, and 11\hspace{0.2em} 11 \hspace{0.2em}.

Step 4.  Is 141\hspace{0.2em} 141 \hspace{0.2em} a prime number. That's it.

So, 141 a prime number. That's it.

3\hspace{0.2em} 3 \hspace{0.2em} has a simple divisibility test. If the sum of digits of a number is divisible by 3\hspace{0.2em} 3 \hspace{0.2em}, the number must also be divisible by 3\hspace{0.2em} 3 \hspace{0.2em}. Try with 141\hspace{0.2em} 141 \hspace{0.2em}.

What Are Co-Prime Numbers?

if they have no positive common factor except 1\hspace{0.2em} 1 \hspace{0.2em}. For example, 4\hspace{0.2em} 4 \hspace{0.2em} and 5\hspace{0.2em} 5 \hspace{0.2em} are co-prime numbers. There is no positive integer other than 1\hspace{0.2em} 1 \hspace{0.2em} that divides into both 4\hspace{0.2em} 4 \hspace{0.2em} and 5\hspace{0.2em} 5 \hspace{0.2em} evenly.

Another example of co-prime numbers is 2\hspace{0.2em} 2 \hspace{0.2em}, 5\hspace{0.2em} 5 \hspace{0.2em}, and 9\hspace{0.2em} 9 \hspace{0.2em}.

12\hspace{0.2em} 12 \hspace{0.2em} and 18\hspace{0.2em} 18 \hspace{0.2em} are not co-prime because they have common factors other than 1\hspace{0.2em} 1 \hspace{0.2em} (2\hspace{0.2em} 2 \hspace{0.2em}, 3\hspace{0.2em} 3 \hspace{0.2em}, and 6\hspace{0.2em} 6 \hspace{0.2em}).

So, the greatest common factor (GCF) of co-prime numbers is 1\hspace{0.2em} 1 \hspace{0.2em}.

Co-prime numbers are also said to be “relatively prime” or “mutually prime”.


And with that, we come to the end of this tutorial. Until next time.

Frequently Asked Questions

Is 1 a prime number?

No. 1 is neither prime nor composite. By definition, a number has to be greater than 1 to be prime or composite.

Is 2 a prime number? And why?

Yes. 2 is a counting number and has exactly two positive factors – 1 and 2 itself. So it is a prime number. It is the smallest and the only even prime number.

Are all prime numbers odd?

No. 2 is an even prime number. But yes, with the exception of 2, all prime numbers are odd.

An even number greater than 2 cannot prime because it will have at least three factors – 1, the number itself, and 2.

Are all odd numbers prime?

No. Most odd numbers are not prime. For example, 1, 9, 15, 21, 25, 27, etc.

What makes prime numbers so important?

Every natural number greater than 1 is either a prime itself or can be expressed (in a unique way) as a product of primes. For example, 6 can be written as 2 x 3.

But you can’t resolve prime numbers into smaller factors. This makes prime numbers the building blocks of all counting numbers larger than 1.

There’s more. For example, prime numbers are used extensively in cryptography.