Share:

prime numbers practice problems

ما هي الأعداد الأولية

In the following article, we’ll explain prime numbers in detail: What are they? How do we find them and verify if a number is prime or not using two methods for small and large numbers? Additionally, you’ll find a complete table of prime numbers from 1 to 100 and from 1 to 1000, along with a program to check for prime numbers.

Check out the article on how to generate a random number.

What are Prime Numbers?

Prime numbers are natural numbers that are only divisible by themselves and by one (with no remainder). We can also say that prime numbers are positive natural numbers greater than one that have only two factors: one and the number itself.

Non-prime numbers are called composite numbers. For example, 7 is a prime number because it’s only divisible by 7 and 1, thus it has only two factors. Whereas 4 is not prime (it’s called composite) because it’s divisible by more than two factors (it’s divisible by 4, 2, and 1, meaning it has 3 factors, not just two).

It’s worth noting that 1 is neither a prime nor a composite number.

Conclusion: In general, we can divide numbers (except one) into prime and composite numbers.

Also, an important piece of information: we can say that all prime numbers are odd, with the exception of the number 2, which is considered the only even number classified as prime.

Furthermore, the number two is the smallest prime number among all prime numbers.

Any number ending in 5 is a non-prime number (except for 5 itself). Why? Because all numbers ending in 5 (such as 365 or 9745) are divisible by themselves, 5, and 1 at least, meaning they have at least 3 factors and are therefore not prime numbers.

The only prime number that ends in the digit five is five itself!
Because any prime number greater than five that ends in five is divisible by 5, 1, and itself, giving it at least 3 factors, thus it’s not a prime number.

From all the preceding observations, we conclude the following:

Prime numbers are positive natural numbers that have only two factors: one and the number itself.

Examples of prime numbers include 2, 3, 5, 7… We’ll learn how to verify prime numbers, but first, let’s look at the prime number tables.

Prime Number Checker Program

Loading…

What are the Prime Numbers from 1 to 100?

There are 25 prime numbers from one to one hundred. You can view the prime numbers from 1 to 100 in the following table:

Prime numbers table from 1 to 100

You can read the short article about prime numbers from 1 to 20.

Prime Numbers from 1 to 1000

The following table lists the prime numbers from 1 to 1000:

RangeNumber of PrimesPrime Numbers
1-10025 prime numbers2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97
101-20021 prime numbers101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199
201-30016 prime numbers211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293
301-40016 prime numbers307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397
401-50017 prime numbers401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499
501-60014 prime numbers503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599
601-70016 prime numbers601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691
701-80014 prime numbers701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797
801-90015 prime numbers809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887
901-100014 prime numbers907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997

Properties of Prime Numbers

From the above, we can deduce some properties of prime numbers:

  • A prime number is always a natural number greater than one.
  • A prime number has only two factors: one and the number itself.
  • Prime numbers are not regularly ordered within the set of numbers, and scientists have not yet found a rule indicating the position of a prime number among the sets of natural numbers. Despite this, many theories have emerged about the ordering of prime numbers, or more precisely, predicting the existence of a prime number.
  • As the value of a prime number increases, the gap between it and the next prime number generally widens.
  • Prime numbers are infinite.
Is zero a prime number? And why?

No, zero is not a prime number because, simply put, it’s not divisible by one.

Is one a prime number and why?

No, the number one is not considered a prime number. Although it is divisible by itself and by one, it violates one of the conditions for prime factors, which is having two factors, and it ultimately has only one factor, which is itself.

What is the Difference Between Prime and Composite Numbers?

I will explain the difference between a prime number and a non-prime number in the following paragraph:

Prime Numbers and Composite Numbers

As we said earlier, a prime number is a natural number strictly greater than one and must have exactly two factors. For example, the number five can only be formed by multiplying 5 × 1. Whereas a composite (non-prime) number can have more than two factors. For example, the number 6 can be formed using 4 factors: 6×1, 2×3, 2×3×1… etc.

Composite numbers are numbers greater than one and can have more than two factors. For example, the number 4 can be formed by three factors: 1, 2, and 4. Therefore, it has more than two factors, so 4 is considered a composite number.

The easiest way to know a prime number

There are several methods to identify a prime number, whether it’s small or large.

Factoring to Identify a Prime Number

Factoring is an easy and simple method for identifying prime numbers. To identify a prime number, follow these three steps:

  1. Find the factors of the number.
  2. Check the number of factors.
  3. If the number of factors is more than 2, the number is not prime.

It’s that simple! Let’s take an example of this method.

Is 18 a prime number?

It can be written as 1×2×3×3. Therefore, the factors of 18 are: 1, 2, 3, 6, 9, 18. This means the number of factors is 6. Thus, the last condition is not met, and 18 is not a prime number.

Is 19 a prime number?

We observe that 19 can only be written as 1×19. Therefore, the number of factors is only 2, and 19 is a prime number.

Identifying Large Prime Numbers

The task becomes more difficult when dealing with large numbers. However, there are a set of rules for identifying large prime numbers. We check them in order:

  1. If the number is even, it is not prime, except for 2 (according to the definition). That is, if the digit in the units place is 0, 2, 4, 6, or 8.
  2. If the number ends in 5, it is a non-prime number (except for 5 itself – because it will be divisible by itself, 1, and 5 at the very least).
  3. If the sum of the digits of the number is divisible by 3, it is not a prime number.
  4. If the previous steps are not met, find the square root of the number. Divide the number by all prime numbers whose value is less than the square root of the number.
  5. If the number is divisible by any of the previous prime numbers, it is a non-prime number; otherwise, it is a prime number.

Let’s take a look at some examples of finding large prime numbers:

Is 651492 a prime number?

We notice that the number ends in 2, so it is an even number and therefore not prime. (Applying Rule 1)

Is 89835 a prime number?

No, applying Rule 2, the number ends in 5, so it is divisible by 1, itself, and 5. This means it has at least 3 factors, and therefore it is not prime.

Is 4647 a prime number?

Rules 1 and 2 are not met. Let’s try Rule 3. Let’s calculate the sum of the digits of the number 4+6+4+7 = 21. We notice that the sum 21 is divisible by 3, so the number 4647 is not prime.

Is 1277 a prime number?

Rules 1 and 2 are not met. Let’s try Rule 3. The sum of the digits of the number is 1+2+7+7 = 17, and 17 is not divisible by 3. Let’s try the last rules 4 and 5.
We find the square root using a calculator, which is 35.7. We refer to the table of prime numbers from 1 to 100 in the previous sections and divide the number 1277 by all prime numbers whose value is less than the square root 35.7.
1277 ÷ 29 = 44.03
1277 ÷ 23 = 55.52
1277 ÷ 19 = 67.21
1277 ÷ 17 = 75.11
1277 ÷ 13 = 98.23
1277 ÷ 11= 116.09
1277 ÷ 7 = 182.4
1277 ÷ 5 = 255.4
1277 ÷ 3 = 425.6
1277 ÷ 2 = 638.5
We observe that it is not divisible by any of the mentioned numbers. Therefore, 1277 is a prime number.

Frequently Asked Questions About Prime Numbers

Is 0 a prime number? And why?

No. Zero is not a prime number. One of the conditions for prime numbers is that they must be positive natural numbers.

Is 2 a prime number?

Yes, 2 is a prime number and it’s the only even prime number. It’s prime because it has only two factors: 2 and 1.

Is 9 a prime number? And why?

No, 9 is definitely not a prime number because 9 can be obtained from the product of, for example, 3×3×1, and therefore it has more than two factors, making it a composite number.

Is 11 a prime number?

Yes. The number 11 is prime, as it can only be obtained through two factors: 11 and 1.

Is 23 a prime number?

Yes, 23 is a prime number. It can only be written as the product of 23 by 1.

Is 197 a prime number?

Yes, 197 is a prime number. Let’s verify it using the rules for large prime numbers:
1. The number is even.
2. The number ends in 5.
3. The sum of the digits is divisible by 3.
4. The square root of the number is 14.03. We check for divisibility by all prime numbers smaller than the square root of the number and notice that it is not divisible by any of them. Therefore, 197 is a prime number.
التحقق من العدد الأولي

Do you have any questions? Feel free to ask in the comments.

Leave a Comment

Your email address will not be published. Required fields are marked *

اخترنا لك no posts found
×