I know it’s hard to believe, but you too can use a simple formula to generate all the prime numbers!

You probably thought that there is no such formula — one that will generate all and only the prime numbers (formula, not sieve). Right?

Well, it turns out that there is! (More or less.)

Keep reading…

Just start with the magic number 2.920050977316… And then follow this recursive formula:

(Be sure you are reading carefully, as the Equation Editor makes it all too easy to misread the floor symbols as absolute value symbols.) Starting with f0, notice that the integer parts of the numbers you’ve generated are {2, 3, 5, 7,…}.

If you’re not convinced, generate the next few. See — all the primes, in order!

Now go watch this captivating video by the amazing James Grime. Be prepared!



Categories: Math