Hacker News new | past | comments | ask | show | jobs | submit login

No other prime is divisible by 3 than 3 itself and so on. And you can't ever get a number divisible by 3 by multiplying numbers that are not divisible by 3. (3n-1) * m mod 3 and (3n-2) * m mod 3 cycle predictably and never become zero unless m mod 3 = 0. The same principle should hold for every number.



You're right that there's only so many possible nonzero remainders mod 3, and you can check for yourself that if you multiply any of them together, you end up with another non-multiple of 3.

The same is true for 5: it takes a little more time to check, since there are a few more possible remainders mod 5, but it happens to be true, and so you can indeed verify, that when you multiply non-multiples of 5 together, the result is also a non-multiple of 5.

And you can go ahead and check by brute force that this is true of 7, and 11, and 13 as well. Mod any of those, when you multiply nonzero values, you get a nonzero result. Any modulus this happens to be true of, you can sit down and verify that it's true of, by just checking all the finitely many cases.

But knowing it's true of the first few primes doesn't guarantee the same fact will be true of every other prime you check.

How do we know that this is in fact the case for every prime?

It's not true of every number, after all: 4 isn't divisible by 10, and 5 isn't divisible by 10, and yet 4 * 5 is divisible by 10. 10 doesn't have the property that it only divides a product if it divides one of the factors.

So why do primes have this property? Obviously, if 0 < A, B < p, you can't get A * B = p right on the dot (by the relevant definition of "prime"), but why can't it be the case that A * B = some multiple of p?

This is a non-obvious fact. This is where the Euclidean algorithm reasoning invoked above comes in. It doesn't just follow immediately.


The mod-cycling-predictably property also holds for composite numbers, while I think the "can't get a number divisible by 3 by multiplying numbers that are not divisible by 3" part relies on the fundamental theorem of arithmetic! (Otherwise, how do we know that you can't get a number divisible by 3 by multiplying numbers that are not divisible by 3, yet the same doesn't hold for 4? I think that's the fundmental theorem of arithmetic back again in another guise.)


You could probably build that up from the peano axioms and the definition of multiplication and divisibility.


It seems a bit tricky to do so without proving the fundamental theorem along the way, given another commenter's observation that the same principle doesn't hold for divisibility by composite numbers (you can get 726=22×33, where 726 is divisible by 6 yet neither 22 nor 33 is).


No other prime is divisible by (1-sqrt(-5)) than (1-sqrt(-5)) itself, and yet you can multiply other numbers together and get a number divisible by (1-sqrt(-5)), namely 2 and 3 to get 6.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: