With prime numbers, we always get a headache. We will see 2 tutorials about quick prime number testing, this one at a basic level, the next one at an advanced level.
The idea of our test is the following: We create an array of bool values, to represent numbers like this:
0 - FALSE
1 - FALSE
2 - TRUE
3 - TRUE
4 - FALSE
5 - TRUE
6 - FALSE
7 - TRUE
8 - FALSE
9 - FALSE
10 - FALSE
11 - TRUE
And so forth! Where we have TRUE, it is a prime number, where we have FALSE, it is not a prime number.