News for hackers. Stuff that matters.
Re:24, the Monster, and quantum gravity by rkaplan on Tuesday June 03, 2014 @08:27AM (#7839666)
For the curious: the reason that this property with 24 holds is because 24 = 2^3 * 3. For any prime number p:

p^2 - 1 = (p+1)(p-1)

And p+1 and p-1 must both be multiples of 2 because p is odd. Furthermore, one of p+1 or p-1 is also a multiple of 4 (because they are both multiples of 2 and only 2 apart). So, we can see where the 2^3 factor comes from in the magic number 24. The remaining factor, 3, comes from the fact that p is prime and not a multiple of 3, so either p+1 or p-1 must be a multiple of 3 (otherwise p-1, p, and p+1 would be three consecutive numbers, none of which are divisible by 3, which is impossible).

As a result, for any prime p > 3, (p+1)(p-1) is divisible by 24, so p^2 - 1 is also divisible by 24.

Re:24, the Monster, and quantum gravity by acjohnson55 on Tuesday June 03, 2014 @09:08AM (#7839893)
Haha, I feel so stupid now! Number theory always seems to impart this feeling to me. So many remarkable looking "coincidences" that have perfectly logical reasoning to explain them, if you dig a little.
Re:24, the Monster, and quantum gravity by anigbrowl on Tuesday June 03, 2014 @04:13PM (#7842439)
I don't feel it's any the less remarkable for being logical...
Re:24, the Monster, and quantum gravity by logicallee on Tuesday June 03, 2014 @09:04AM (#7839858)
you've just taken a ton of magic out of this article!

It seems downright obvious that p^2 - 1 would have to be divisible by 24 for any prime other than 2 or 3, and in fact completely unremarkable, after you point out the factorization.

After factoring p^2 -1 into (p+1)(p-1) you could have given the rest of the proof as an exercise to the reader.

Re:24, the Monster, and quantum gravity by shasta on Tuesday June 03, 2014 @10:32AM (#7840409)
Factoring p^2-1 into (p+1)(p-1) when you're trying to prove something about the factors of p^2 - 1 isn't exactly magic either. The entire proof is a pretty easy exercise. The only hard step is "stop reading and think for a moment".
Re:24, the Monster, and quantum gravity by leorocky on Tuesday June 03, 2014 @09:58AM (#7840184)
The wikipedia article on the monster group doesn't even mention the number 24.
Re:24, the Monster, and quantum gravity by Someone on Tuesday June 03, 2014 @12:45PM (#7841259)
For any prime number p: p^2 - 1 = (p+1)(p-1) That's true for every number, including for example 3.4, PI, and 3+5i
Re:24, the Monster, and quantum gravity by TrainedMonkey on Tuesday June 03, 2014 @01:46PM (#7841664)
Which is itself is just special case of difference of squares property:

x^2 - y^2 = (x - y) * (x + y)

In this case y is 1 and y^2 is 1, so this gives us aforementioned:

x^2 - 1 = (x - 1) * (x + 1)

Here is wikipedia page with the proof: http://en.wikipedia.org/wiki/Difference_of_two_squares

Re:24, the Monster, and quantum gravity by stbarnes on Tuesday June 03, 2014 @09:53PM (#7843637)
Which is itself a special case of the rule for the difference of two nth powers...
Re:24, the Monster, and quantum gravity by dnautics on Tuesday June 03, 2014 @01:45PM (#7841658)
That's why the next sentence begins with the word "and"
Re:24, the Monster, and quantum gravity by nilkn on Tuesday June 03, 2014 @05:18PM (#7842793)
It's generally best when writing a mathematical proof to be crystal clear about what assumptions are needed and which aren't.

(Of course, the OP doesn't deserve this level of criticism--he was just writing a quick sketch up on the internet.)

Re:24, the Monster, and quantum gravity by JackFr on Tuesday June 03, 2014 @09:46AM (#7840116)
As an exercise to the for the reader show that any pair of twin primes surrounds a multiple of 6.
Re:24, the Monster, and quantum gravity by JoshTriplett on Tuesday June 03, 2014 @09:55AM (#7840159)
Not quite true: the first twin primes, 3 and 5, surround 4, not divisible by 6. However, for any other twin primes, both will not have factors of 2 or 3, so the number between them must have a factor of 2 and a factor of 3 (the latter by the same logic as in the parent post: otherwise three numbers in a row would not have a factor of 3).
Re:24, the Monster, and quantum gravity by JackFr on Tuesday June 03, 2014 @10:28AM (#7840378)
Arghh. True.
Re:24, the Monster, and quantum gravity by kremlin on Wednesday June 04, 2014 @07:51AM (#7845024)
Any pair of consecutive odds both of which are not divisible by 3 surround a multiple of 3
Re:24, the Monster, and quantum gravity by cafard on Wednesday June 04, 2014 @08:44AM (#7845209)
5 and 7?
Re:24, the Monster, and quantum gravity by kremlin on Wednesday June 04, 2014 @05:30PM (#7848482)
those surround 6.
Re:24, the Monster, and quantum gravity by kremlin on Tuesday June 03, 2014 @04:42PM (#7842595)
brilliantly clear explanation
Re:24, the Monster, and quantum gravity by mathattack on Tuesday June 03, 2014 @04:46PM (#7842624)
Yes - the magic is stripped away by very clear algebra.
Re:24, the Monster, and quantum gravity by woofuls on Tuesday June 03, 2014 @11:45AM (#7840875)
I was just curious, why is 24 x 10000+1 = 107 x 2243 not prime? I was under the impression for any n, 24 x n + 1 is prime.
Re:24, the Monster, and quantum gravity by TrainedMonkey on Tuesday June 03, 2014 @01:55PM (#7841721)
For prime generating sequence you would be much better with Mersenne: http://en.wikipedia.org/wiki/Mersenne_prime

AFAIK there is no sequence that lists all primes, because of the property of prime numbers themselves (not divisible by anything except 1 and themselves). This essentially means that you can't use multiplication to generate primes.

Moreover checking if number is prime is hard in itself, because you need to check for divisibility by all previous prime numbers up until square root of prime candidate you are trying to check. Thus you can think of prime numbers as recursive series.

Re:24, the Monster, and quantum gravity by danbruc on Tuesday June 03, 2014 @02:10PM (#7841815)
Moreover checking if number is prime is hard in itself, because you need to check for divisibility by all previous prime numbers up until square root of prime candidate you are trying to check.

That is not true - since 2002 a deterministic polynomial time primality test is known [1]. And even before that primality test faster than trial division were known [2].

Besides that it is true that there is currently no known algorithm to easily enumerate all primes but it is not impossible that such an algorithm exists.

[1] http://en.wikipedia.org/wiki/AKS_primality_test

[2] http://en.wikipedia.org/wiki/Primality_test

Re:24, the Monster, and quantum gravity by cecilpl on Tuesday June 03, 2014 @11:59AM (#7840946)
If that was the case, generating prime numbers would be much easier than it is.
Re:24, the Monster, and quantum gravity by gatehouse on Tuesday June 03, 2014 @12:34PM (#7841195)
24x1 + 1 = 25, so we're off to a bad start.
Re:24, the Monster, and quantum gravity by Someone on Tuesday June 03, 2014 @12:51PM (#7841298)
But it gets better soon: 24x2 + 1 = 49 and that is prime, isn't it? :-)
Re:24, the Monster, and quantum gravity by tlammens on Tuesday June 03, 2014 @01:28PM (#7841535)
You forget the square root: 5 is prime.
Re:24, the Monster, and quantum gravity by stbarnes on Tuesday June 03, 2014 @09:55PM (#7843640)
huh? great-grandparent said nothing about square roots