# In which pigs fly, hell freezes over, and Malleus expresses an interest in math

**URL:** https://boards.straightdope.com/t/in-which-pigs-fly-hell-freezes-over-and-malleus-expresses-an-interest-in-math/529878
**Category:** Factual Questions
**Created:** [February 21, 2010, 4:38pm UTC](https://boards.straightdope.com/t/in-which-pigs-fly-hell-freezes-over-and-malleus-expresses-an-interest-in-math/529878 "2010-02-21T16:38:55Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Malleus\_Incus\_Stapes](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/malleus_incus_stapes/32/3293_2.png) [@Malleus\_Incus\_Stapes](https://boards.straightdope.com/u/Malleus_Incus_Stapes)
#### Post date: [February 21, 2010, 4:38pm UTC](https://boards.straightdope.com/t/in-which-pigs-fly-hell-freezes-over-and-malleus-expresses-an-interest-in-math/529878/1 "2010-02-21T16:38:55Z")

</div>

I am not a math person. I find it very hard to pay attention to something that abstract. If I had to guess, I’d say my math skills are around an eight grade level (there’s a reason, but it’s too long to get into now). I normally don’t give a fig whether X equals Z squared to the tenth power or not.

That being said, I was lying awake the night before my brother’s eleventh birthday, thinking about goofing off at cake time. I thought maybe I’d say the “Are you one, are you two, are you three, etc” in prime numbers or Fibonacci sequence. (Don’t ask me why I know Fibonacci numbers, but not calculus. Just don’t).  
As I was going through the prime numbers in my head, I noticed they all (except 2) ended in 1, 3, 7, or 9. Wow, this calculating primes was easier than I thought.  
Of course, not every -1, -3, -7, or -9 is a prime. I realized that the ones that _weren’t_ primes had digits that added up to a number divisible by three. A mystery here! Why three?  
Then I found an exception to the exception. If one of the digits being added up is a one, than it’s still a prime number. So 51 is a prime, but 33 is not.

Why are 3 and 1 so special? Is there an explanation that could be understood by a mathematical illiterate with a short attention span like me?

---

<div class="post-metadata">

### Author: ![code\_grey](https://avatars.discourse-cdn.com/v4/letter/c/f4b2a3/32.png) [@code\_grey](https://boards.straightdope.com/u/code_grey)
#### Post date: [February 21, 2010, 4:47pm UTC](https://boards.straightdope.com/t/in-which-pigs-fly-hell-freezes-over-and-malleus-expresses-an-interest-in-math/529878/2 "2010-02-21T16:47:34Z")

</div>

is this a joke? All numbers with digit sum divisible by 3 are divisible by 3, including 51 = 17 \* 3

---

<div class="post-metadata">

### Author: ![Bricker](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@Bricker](https://boards.straightdope.com/u/Bricker)
#### Post date: [February 21, 2010, 4:52pm UTC](https://boards.straightdope.com/t/in-which-pigs-fly-hell-freezes-over-and-malleus-expresses-an-interest-in-math/529878/3 "2010-02-21T16:52:26Z")

</div>

5 itself is prime.

51 is not.

No other ending-in-5 numbers are prime because they are all divisible by 5.  
No even number other than 2 is prime.

So we’re left with numbers ending in 1, 3, 7, or 9 as possible primes.

---

<div class="post-metadata">

### Author: ![Malleus\_Incus\_Stapes](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/malleus_incus_stapes/32/3293_2.png) [@Malleus\_Incus\_Stapes](https://boards.straightdope.com/u/Malleus_Incus_Stapes)
#### Post date: [February 21, 2010, 5:03pm UTC](https://boards.straightdope.com/t/in-which-pigs-fly-hell-freezes-over-and-malleus-expresses-an-interest-in-math/529878/4 "2010-02-21T17:03:28Z")

</div>

> [@code\_grey](#):
>
> is this a joke? All numbers with digit sum divisible by 3 are divisible by 3, including 51 = 17 \* 3

Tolja I’m stupid.

---

<div class="post-metadata">

### Author: ![Chipacabra](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@Chipacabra](https://boards.straightdope.com/u/Chipacabra)
#### Post date: [February 21, 2010, 5:03pm UTC](https://boards.straightdope.com/t/in-which-pigs-fly-hell-freezes-over-and-malleus-expresses-an-interest-in-math/529878/5 "2010-02-21T17:03:42Z")

</div>

1 isn’t special. Your rule about numbers ending in 1 doesn’t work. 51 isn’t prime. (3\*17=51)

3 is special because 9 is divisible by 3. 9 is special because we use a base 10 system, 9 is right before you roll over into a new digit.

Here’s why the digits of a multiple of 3 always add up to a multiple of 3. We’ll stick with 2 digit numbers, but the logic works no matter how big the number gets.

Take any 2 digit number and call the first digit a and the second digit b. So if you’re looking at 54, a=5 and b=4. Now, another way you could write this is that a is the 10s digit, so write it as 10_a + b. 10_a can be rewritten as 9_a + a. So the whole thing can be written as 9_a + (a + b).

Those parentheses are just there for emphasis, by the way.

Now, 9\*a is obviously divisible by 9, and thus is divisible by 3. So your number ab is divisible by 3 if and only if (a+b) is divisible by 3.

The 10_a = 9_a + a step is what makes 9 special, and like I said, it works because 9 is the number you get when you step down a digit. If we were working in base 8, then 7 would be the special number and 3 wouldn’t be anything.

---

<div class="post-metadata">

### Author: ![twhitt](https://avatars.discourse-cdn.com/v4/letter/t/87869e/32.png) [@twhitt](https://boards.straightdope.com/u/twhitt)
#### Post date: [February 21, 2010, 5:28pm UTC](https://boards.straightdope.com/t/in-which-pigs-fly-hell-freezes-over-and-malleus-expresses-an-interest-in-math/529878/6 "2010-02-21T17:28:28Z")

</div>

I’m not going to add much that’s new to the conversation, but I’ll sum up what a few have said. If you’re looking at the trailing digits, any number that ends with an even digit is a multiple of 2. So any numbers with the trailing digit of 2, 4, 6, 8 and 0 are not prime, except for the number 2. 5 is prime, but multiples of 5 all end in 5 or in 0, so 5 is added to the above list. Four digits remain from the original ten, which are 1, 3, 7 and 9 as you observed. Not all numbers ending in those digits are prime, but if a number is prime (and at least two digits long) then it must end with a digit from that list, by elimination. Of all numbers that end in 1, 3, 7 or 9 approximately a third will be a multiple of 3 because one out of any three numbers chosen at random is divisible by 3. This means that you’ll notice more of the numbers that were candidates for prime only because of their trailing digit being a 1, 3, 7 or 9 are eliminated for being a multiple of 3 than for any other reason. You correctly identified that, as well. After 3 your second most likely cause for elimination from that list would be multiples of 7, which are harder to identify offhand in addition to being much less common (the first would be 49). After 7, the next most common would be multiples of 11, but those aren’t too frequent, and the first would be 99.

---

<div class="post-metadata">

### Author: ![Nametag](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/nametag/32/406_2.png) [@Nametag](https://boards.straightdope.com/u/Nametag)
#### Post date: [February 21, 2010, 5:42pm UTC](https://boards.straightdope.com/t/in-which-pigs-fly-hell-freezes-over-and-malleus-expresses-an-interest-in-math/529878/7 "2010-02-21T17:42:08Z")

</div>

> [@](#):
>
> and the first would be 99.

That would have been eliminated by the “divisible by three” rule. The first number eliminated by the “multiple of 11” rule would be 121.

---

<div class="post-metadata">

### Author: ![twhitt](https://avatars.discourse-cdn.com/v4/letter/t/87869e/32.png) [@twhitt](https://boards.straightdope.com/u/twhitt)
#### Post date: [February 21, 2010, 5:52pm UTC](https://boards.straightdope.com/t/in-which-pigs-fly-hell-freezes-over-and-malleus-expresses-an-interest-in-math/529878/8 "2010-02-21T17:52:17Z")

</div>

> [@Nametag](#):
>
> That would have been eliminated by the “divisible by three” rule. The first number eliminated by the “multiple of 11” rule would be 121.

D’oh. You’re absolutely right, and I feel silly for the mistake. I think that the point stands, though.

---

<div class="post-metadata">

### Author: ![LSLGuy](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lslguy/32/5813_2.png) [@LSLGuy](https://boards.straightdope.com/u/LSLGuy)
#### Post date: [February 21, 2010, 6:04pm UTC](https://boards.straightdope.com/t/in-which-pigs-fly-hell-freezes-over-and-malleus-expresses-an-interest-in-math/529878/9 "2010-02-21T18:04:54Z")

</div>

We’re all informally implementing the Sieve of Eratosthenes. See [Sieve of Eratosthenes - Wikipedia](http://en.wikipedia.org/wiki/Sieve_of_Erastosthenes) for a graphic illustration of how/why it works.

---

<div class="post-metadata">

### Author: ![Malleus\_Incus\_Stapes](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/malleus_incus_stapes/32/3293_2.png) [@Malleus\_Incus\_Stapes](https://boards.straightdope.com/u/Malleus_Incus_Stapes)
#### Post date: [February 21, 2010, 8:40pm UTC](https://boards.straightdope.com/t/in-which-pigs-fly-hell-freezes-over-and-malleus-expresses-an-interest-in-math/529878/10 "2010-02-21T20:40:14Z")

</div>

Thanks. Like I said, I missed out on an entire high school math curriculum, so I don’t know what I’m talking about.
