My route for checking whether a number is a prime (>3) is if n-5÷6= whole number or n-7÷6= whole number
Is this wrong please?
Sue
My route for checking whether a number is a prime (>3) is if n-5÷6= whole number or n-7÷6= whole number
Is this wrong please?
Sue
This is wrong: it is a very elementary sieve which relies on the fact that any prime greater than $3$ is of the form $6n\pm 1$ or alternatively of the form $6m+5$ or $6m+7$.
You can tell it is wrong because dividing by $6$ can only possibly deal with the primes $2$ and $3$ - it does that efficiently enough, but leaves untested $5, 7, 11 \dots$