Prime or Not: Determining Primes Through Square Root

A prime number is a integer greater than that is divisible only by 1 and itself. A number that is not prime is composite.

To determine whether a number is prime or not, we have to divide it by all numbers between 1 and itself . For example, to say that 257 is prime, we must be sure that it is not divisible by any number between 1 and 257. In this discussion, the word “numbers” refer to positive integers.

Are you prime or not?

Dividing a number by all numbers between 1 and itself is burdensome especially for large numbers. In this post, we discuss a shorter way of determining if a number is prime and explain why the method works. » Read more