4 ms·
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.
by woofuls 12y ago
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.
- cecilpl 12y agoIf that was the case, generating prime numbers would be much easier than it is.
- gatehouse 12y ago24x1 + 1 = 25, so we're off to a bad start.
- TrainedMonkey 12y agoFor prime generating sequence you would be much better with Mersenne: http://en.wikipedia.org/wiki/Mersenne_prime 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.
- danbruc 12y agoMoreover 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 http://en.wikipedia.org/wiki/AKS_primality_test [2] http://en.wikipedia.org/wiki/Primality_test http://en.wikipedia.org/wiki/Primality_test