Prime Number

Check if a number is prime or not.

Numbers Stateless

An integer number >= 0

<= 10^18

A prime number is a natural number >= 0 that is divisible by only 1 and itself. 1 is not a prime number because it is divisible by only 1. 0 is not a prime number because it is divisible by all numbers. Negative numbers are not taken into consideration for prime checking.

The number 7 is a prime number because it is divisible by only 1 and 7.

The number 9 is not a prime number because it is divisible by 1, 3 and 9.