I adapted this from the work of the brilliant Peter Plichta.
First you need to know the first 6 low prime numbers up to 11 (1, 2, 3, 5, 7, 11).
After this call the number you want to test P.
Use [(P-5 or P-7) / 6 = an integer] to test if the number is a prime.
For example - say you want to know if 911 is a prime number:
(911 - 5) / 6 = 151 (is an integer - so 911 is a prime number)
(911 - 7) / 6 = 150.667 (disregard)
Another example: 7017
(7017 - 5) / 6 = 1168.667 (disregard)
(7017 - 7) / 6 = 1168.333 (disregard both - so 1717 is not a prime number)
And another example:
(4909 - 5) / 6 = 817.333 (disregard)
(4909 - 7) / 6 = 817 (is an integer - so 4909 is a prime number)
This comes in useful for trig problems when you are left with a horrible radical to simply (say (127)^0.5) - you can be fiddling about and fretting thinking ("this must have factors - what am I missing?") but:
(127 - 5) / 6 = 20.333 (disregard)
(127 - 7) / 6 = 20 (is an integer - so 127 is a prime number)
127 is a prime number and has no factors (except 1 and itself) - so you can use this simple method [(P-5 or P-7) / 6 = an integer] to be confident you have fully solved the problem when asked to present something in its simplest form.
For fun lets see if the US federal debt (to the nearest dollar - today 18 December 2014) is a prime number:
($18,033,285,352,731 - 5) / 6 = 3005547558787.667 (disregard)
($18,033,285,352,731 - 7) / 6 = 3005547558787.333 (disregard both) - so $8,033,285,352,731 is not a prime number but it is big [$150,277 for every working person in the USA]).
First you need to know the first 6 low prime numbers up to 11 (1, 2, 3, 5, 7, 11).
After this call the number you want to test P.
Use [(P-5 or P-7) / 6 = an integer] to test if the number is a prime.
For example - say you want to know if 911 is a prime number:
(911 - 5) / 6 = 151 (is an integer - so 911 is a prime number)
(911 - 7) / 6 = 150.667 (disregard)
Another example: 7017
(7017 - 5) / 6 = 1168.667 (disregard)
(7017 - 7) / 6 = 1168.333 (disregard both - so 1717 is not a prime number)
And another example:
(4909 - 5) / 6 = 817.333 (disregard)
(4909 - 7) / 6 = 817 (is an integer - so 4909 is a prime number)
This comes in useful for trig problems when you are left with a horrible radical to simply (say (127)^0.5) - you can be fiddling about and fretting thinking ("this must have factors - what am I missing?") but:
(127 - 5) / 6 = 20.333 (disregard)
(127 - 7) / 6 = 20 (is an integer - so 127 is a prime number)
127 is a prime number and has no factors (except 1 and itself) - so you can use this simple method [(P-5 or P-7) / 6 = an integer] to be confident you have fully solved the problem when asked to present something in its simplest form.
For fun lets see if the US federal debt (to the nearest dollar - today 18 December 2014) is a prime number:
($18,033,285,352,731 - 5) / 6 = 3005547558787.667 (disregard)
($18,033,285,352,731 - 7) / 6 = 3005547558787.333 (disregard both) - so $8,033,285,352,731 is not a prime number but it is big [$150,277 for every working person in the USA]).
Last edited: