News for hackers. Stuff that matters.
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