|
|
|||||||||||||
|
|
|
||||||||||||
|
In Issue 2, of Infinity,
we generated primes by simply testing random numbers for divisors. However
for large primes such a process is inefficient. A better strategy would be
to identify a pattern which generates primes. For instance each of the numbers 23 - 1 = 7 25 - 1 = 31 27 -1 = 127 is prime. So in general one can ask,
While this rule is not true in general it has been used to generate some very large primes. See if you can write a QBASIC program (or modify the one from Issue 2 of Infinity) to find all primes, p, less than 30 for which 2p - 1 is not prime. What is the largest prime number you can generate using this rule?
|
|||||||||||||