Prime and composite numbers

Prime numbers

If we try to find divisors of number $13$ we will see that it only has itself and the unit as divisors.

$$13 \div 13=1$$

$$13 \div 1=13$$

Therefore, it will not be a multiple of any number, apart from the $1$ and $13$.

$$13 \times 1=13$$

It is said that it is a prime number. The prime numbers are, therefore, those that can only be divided by themselves and the unit.

Here is a list with the first 25 prime numbers:

$$2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89\mbox{ i }97$$

To find out if a number is prime it is necessary to try to divide it by the prime numbers less than itself. If it is really a prime, none of these divisions will be exact. The moment the quotient is equal or less than the divisor, we can conclude that this is a prime number.

If we want to verify if number $157$ is prime, we have to do the following divisions:

![image](../../../images/457__d52784fd6e89.svg) ![image](../../../images/457__6481bcb4aa9a.svg) ![image](../../../images/457__0d964727a8df.svg)

![image](../../../images/457__72915a21bdbc.svg) ![image](../../../images/457__c32d97b2c92e.svg) ![image](../../../images/457__054052554cd4.svg)

In this latter division we have already obtained a quotient ($12$) less than the divisor ($13$), therefore it is not necessary to keep on dividing any more: it is confirmed that number $157$ is prime.

With the number $239$ more divisions are needed to reach the same conclusion:

![image](../../../images/457__b3fdd89be02c.svg) ![image](../../../images/457__d0c18e856d80.svg) ![image](../../../images/457__6f285654c15f.svg)

![image](../../../images/457__5705a70e3946.svg) ![image](../../../images/457__3bd2a020661a.svg) ![image](../../../images/457__dd62e44989dc.svg) ![image](../../../images/457__8430d0756942.svg)

In the latter division, the quotient ($14$) is less than the divisor ($17$), so we can already confirm that $239$ is really a prime number.

Composite numbers

A composite number is a number that is not prime, that is, it has more than two divisors: itself, the unit, and other numbers.

Practice exercises