èƵ

Mathematician’s record-beating formula can generate 50 prime numbers

Figuring out the pattern of the primes is one of the long-standing mysteries of maths, and now there is a way to spit some out on demand
There is an infinite amount of prime numbers, but here are 16 of them
There is an infinite amount of prime numbers, but here are 16 of them
jvphoto / Alamy

Mathematicians have spent millennia trying to understand prime numbers – those only divisible by themselves and 1 –  but so far no one has discovered a pattern for the primes. Now mathematician Simon Plouffe has discovered a new method to produce long sequences of prime numbers, improving on previous efforts.

For example, we’ve known since the 18th century that n² + n + 41 is prime for values of n up to 39. It breaks down at n = 40, as the formula gives 1681, which is equal to 41² and thus not prime.

Other types of prime-generating formulas start with a carefully chosen number and use this to generate a string of primes. If you start with n = 1.92878, calculate 2n and replace n with this new value, you get a sequence of numbers. Ignore everything after the decimal points and the first three numbers in the sequence are prime.

By tweaking the value of n more precisely, you can generate even more prime numbers. As many as you want, in fact – but you won’t be able to generate all the primes. That’s because the sequence grows far too rapidly, skipping many primes and becoming more difficult to calculate. The function described above generates 3 and then 13, skipping out 5, 7 and 11. After that it jumps to 16,381, followed by a prime 4932 digits long – that’s nearly 105000 times bigger.

Plouffe has tried to find a middle ground – something that doesn’t grow too quickly, but will work indefinitely, unlike the n² + n + 41 example. He starts with a carefully chosen prime number, 10500 + 961, and uses a formula that generates a string of digits that produce a prime around 100,000 times bigger. Applying the formula again produces another prime, again only 100,000 times bigger, so the sequence grows reasonably slowly.

Using this method, Plouffe was able to generate 50 primes – more than any other prime-generating algorithm to date. It’s not magic though. “You have to know the primes in order to get the formula that produces the primes,” says Neil Sloane, founder of the .

It’s interesting that this process works, but for now it remains a curiosity. “There’s not going to be a simple elementary formula for [all] the prime numbers”, says Sloane. This result shows that as much as we know, we’re still barely scratching the surface.

Reference:

Further reading:Riddle of the primes: why do they come in pairs?

Topics: Mathematics / prime numbers