1.Method 1
A prime number can only be divisible by 1 and itself. If it can divide a number from 2 to (i -1), it means that the number is not a prime number.
2. Method 2
If a number is n, then it can be written in the form of a×b; for example, 16=1×16, which is equal to 4×4, 2×8, and these values are equal to 16, then they can be written in the form of a×b, At this time we find that there must be a number that is less than or equal to n/2 (that is, less than or equal to 8). So anything greater than n/2 is a prime number.
3.Method 3
If it can be written in the form of a into b, then we find that there must be a number less than or equal to the root n. Root 4=2; Root 8=2√2; Root 16=4, which is less than or equal to 4, so the range becomes 2~4. In method 1, this range was 2~15, in method 2 it was 2~8, and now it is 2~4.