## Testing if a Number is Prime

A positive whole number\[n\]

is prime if it is divisible by just two numbers - 1 and itself.1 is not a prime number.

We can test if a number

\[n\]

is prime by dividing by all the whole numbers up to and including \[\]

.We need not go so far. In fact we need only divide by the prime numbers up to

\[\sqrt{n}\]

.Example: is 77 prime?\[\sqrt{77} =8.7....\]