# PRIME NUMBERS

## Prime numbers are numbers that can only be divided by themselves or by 1.

#### 13 is a prime number because it will only divide exactly by 1 or 13. If you have 13 eggs, the only box they will neatly fit into has one row of 13 eggs. If you try boxes that are shorter and wider, you'll never neatly fit all 13 eggs in.

##### The prime numbers smaller than 100 are: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97 ... ...and they go on for ever. So far nobody has found a pattern to predict them and they can't decide if 1 is prime or not! Mathematicians LOVE prime numbers because just about all of maths is made out of prime numbers. In the same way, scientists LOVE atoms because just about everything we know is made out of atoms.

You can find out how the ancient Greeks found prime numbers up to 100 and beyond using the Sieve of Eratosthenes.

So now we know what prime numbers are, what can we do with them?

• Smashing big sums to bits! If you've read The Mean and Vulgar Bits then you'll know how to use prime numbers to make ugly divisions and fractions a lot easier.
• Secret Codes! Some of the toughest codes in the world are made using mega prime numbers. You can find how this works in The Secret Life of Codes. There's even a VERY simple prime code in the original Murderous Maths book.
• A good trick....

Before we see the trick, here's a neat toy for you to try. It's a special calculator which can tell you if a number is prime or not. All you need to do is type a number in the box, and then hit the ACTIVATE button. (Warning: if you put in numbers with lots and lots of digits your computer might get a bit cross!)

##### The Prime Tester was invented by Abraham Joffe
 THE PRIME TESTER Thinking... [0%] Thinking... [0%] Type a whole number into the box.
Have you tried it out?

What's the BIGGEST prime number you can find?

 If you want to see the BIGGEST prime number we know about, check the GREAT INTERNET MERSENNE PRIME SEARCH ## The Prime Number Trick

Using prime numbers, you can amaze your friends with a prime prediction...

• Ask your friends to pick any prime number bigger than 5, but they must not tell you what it is.
• Square it. (In other words multiply the prime number by itself.)
• Divide by 12

Without knowing which prime number your friends picked, you can still tell them:

There will be a remainder of 6.

(Or if they do the sum on a calculator, the answer will end with " .5")

If you want to try this out yourself right now, use the Prime Number Calculator to find a nice big juicy prime number.
Put your number into this normal calculator (you need to push the buttons with your mouse). First you multiply your prime number by itself then add 17 and finally divide by 12. What do you get?

For example, if you want to try the trick with the prime number 2801, here's what to push:

2801 * 2801 =
+ 17 =
/ 12 =
...and that's the answer! Now find a new prime number and try it.

## The "24" Mystery!

A Murderous Maths fan called OBAID pointed out that if you square ANY prime number bigger then 3, then subtract 1, the answer always divides by 24!

E.g. 112 = 121 then 121 - 1 = 120 and yes 120 does divide by 24.

WHY?

If you understand algebra, (and you've read The Phantom X ) then you'll know that all prime numbers can be written as (6n+1) or (6n-1).

(6n+1)2 = 36n2+12n+1. So (6n+1)2 -1 = 36n2+12n. This factorises to 12n(3n+1). Either n or (3n+1) must be even, therefore the whole expression must be divisible by 24.

(6n-1)2 = 36n2-12n+1. So (6n-1)2 -1 = 36n2-12n. This factorises to 12n(3n-1). Either n or (3n-1) must be even, therefore the whole expression must be divisible by 24.

#### Find out more about prime numbers in these Murderous Maths books: ##### How huge primes are used in RSA code used for sending credit card numbers over the internet!

Learning prime numbers can even help you master games like blackjack, giving you a better chance of winning. You can take things even further by learning a system known as card counting, which actually gives players the opportunity to beat the casinos at their own game.
{"ft_lang_label":"__label__en","ft_lang_prob":0.91576296,"math_prob":0.9759035,"size":4525,"snap":"2021-31-2021-39","text_gpt3_token_len":1236,"char_repetition_ratio":0.13758019,"word_repetition_ratio":0.026255708,"special_character_ratio":0.28861877,"punctuation_ratio":0.12791878,"nsfw_num_words":1,"has_unicode_error":false,"math_prob_llama3":0.98530656,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],"im_url_duplicate_count":[null,6,null,4,null,10,null,10,null,10,null,2,null,5,null,9,null,5,null,5,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-09-21T20:42:00Z\",\"WARC-Record-ID\":\"<urn:uuid:ab36da7f-1e9d-4de7-923c-5e19429f81d4>\",\"Content-Length\":\"19442\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:10e51b70-371f-4e11-beb4-5616c54bf2e3>\",\"WARC-Concurrent-To\":\"<urn:uuid:c6a3c668-fbb9-4d9f-b765-6393fc47872e>\",\"WARC-IP-Address\":\"78.157.217.7\",\"WARC-Target-URI\":\"http://murderousmaths.co.uk/games/primcal.htm\",\"WARC-Payload-Digest\":\"sha1:DMHYUW5LSOQKLVHMYW74VXZ3CL2X5LNO\",\"WARC-Block-Digest\":\"sha1:BZSD2AW3FPZWICMT5OXFFK56XSGI6QET\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-39/CC-MAIN-2021-39_segments_1631780057227.73_warc_CC-MAIN-20210921191451-20210921221451-00478.warc.gz\"}"}