Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> the discovery that ...

Wouldn't the vast majority of those studying primes learn this from their textbook?

Note that 6k-1 is the same as 6k + 5. By writing that way, we can focus in positive representations of the modulo 6 congruence.

6k + 0 can't be prime, it's divisible by 6, yielding k

6k + 1 might be prime: we cannot rule it out by division.

6k + 2 cannot be prime, it's divisible by 2, yielding 3k + 1.

6k + 3 cannot be prime, it's divisible by 3, yielding 2k + 1

6k + 4 cannot be prime, it's divisible by 2, yielding 3k + 2

6k + 5 might be prime again.

That covers all cases of the modulo 6 congruence.

Thus only 6k + 1 and 6k + 5 can possibly be prime.

This is trivial fluff, only a smidgeon more clever than "all primes greater than 2 are of the form 2k + 1".

Another line of reasoning:

If a number N is divisible by 6, then it is even. This means that N + 2 and N + 4 are also even. Thus none of those numbers are prime.

If a number N is divisible by 6, it is also divisible by 3. This means that N + 3 is also divisible by 3. Thus, it cannot be prime.

That leaves N + 1 and N + 5, whose divisibility doesn't relate to 6.



My textbook, at least, spent its space on the important axioms, theorems and corollaries. There were some easily-rediscovered results there, but mostly its pages described stuff that wasn't trivial to me.

And that's why it's one of the five books I have kept in the decades since.


Here is an exercise: does this generalize from 6 to any M > 2?

The 1 and 5 elements of the (modulo 6) congruence are precisely those which are relatively prime to 6: those two elements that Euler's totient function counts: φ(6) = 2.

It doesn't generalize trivially; there is osmething to puzzle out there. For instance in the case of M = 15, we have 8 being relatively prime to 15. Yet 15k + 8 might be composite (like in the case k = 0).

I may go into it more if I have a bit of time away from other interesting or urgent matters.


6k+1 might also be composite. However, it can be prime; a e.g. 6k+3 can literally never be prime, because it will always be divisible by 3.

Every prime p > 15 can be written as 15k + r, where r = p % 15 is coprime to 15. Put this way, it should be pretty clear what's going going on: gcd(15, r) is necessarily a factor of p, so we need that to be 1. Of course for prime p, gcd(p, q) is necessarily 1 for all q < p.


Care to share the name of that textbook?


Authors called Edwards and Penney IIRC, but it's lent out this year.




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

Search: