Check if a number is a prime number, and find the nearest primes before and after.
A prime number is a whole number greater than 1 that's only divisible by 1 and itself, with no remainder. The first ten primes are 2, 3, 5, 7, 11, 13, 17, 19, 23 and 29. Numbers that aren't prime (other than 0 and 1) are called composite numbers, and can always be broken down into two or more prime factors.
The calculator checks whether the number is divisible by anything up to its square root — an efficient method, since any factor larger than the square root always has a matching factor smaller than the square root.
No. By definition, a prime number must have exactly two distinct positive factors (1 and itself). The number 1 has only one factor (itself), so it's considered neither prime nor composite.
Yes. Every other even number is divisible by 2 in addition to itself and 1, and is therefore a composite number. 2 is thus the only even prime — all other primes are odd.
No. Euclid already proved around 300 BC that there are infinitely many primes. The largest known primes today have millions of digits and are found using specialized software and distributed computing.