An Exact Formula for the Primes: Willans' Formula
Thanks to my supporters on Patreon! Get early access to videos and more: https://www.patreon.com/EricRowland Formulas for the nth prime number actually exis...
🔥 Related Trending Topics
LIVE TRENDSThis video may be related to current global trending topics. Click any trend to explore more videos about what's hot right now!
THIS VIDEO IS TRENDING!
This video is currently trending in Bangladesh under the topic 's'.
About this video
Thanks to my supporters on Patreon! Get early access to videos and more: https://www.patreon.com/EricRowland
Formulas for the nth prime number actually exist! One was cleverly engineered in 1964 by C. P. Willans. But is it useful?
----------------
References:
Herbert Wilf, What is an answer?, The American Mathematical Monthly 89 (1982) 289–292.
https://doi.org/10.1080/00029890.1982.11995435
C. P. Willans, On formulae for the nth prime number, The Mathematical Gazette 48 (1964) 413–415.
https://doi.org/10.2307/3611701
Further reading:
Jeffrey Shallit, No formula for the prime numbers?.
http://recursed.blogspot.com/2013/01/no-formula-for-prime-numbers.html
----------------
# Python code
import math
def prime(n):
return 1 + sum([
math.floor(pow(n/sum([
math.floor(pow(math.cos(math.pi * (math.factorial(j - 1) + 1)/j), 2))
for j in range(1, i+1)
]), 1/n))
for i in range(1, pow(2, n)+1)
])
----------------
(* Mathematica code *)
prime[n_] := 1 + Sum[Floor[(n/Sum[Floor[Cos[Pi ((j - 1)! + 1)/j]^2], {j, 1, i}])^(1/n)], {i, 1, 2^n}]
----------------
0:00 A formula for primes?
1:24 Engineering a prime detector
4:00 Improving the prime detector
5:46 Counting primes
6:29 Determining the nth prime
9:42 The final step
11:36 What counts as a formula?
12:56 What's the point?
13:51 Who was Willans?
----------------
Animated with Manim. https://www.manim.community
Thanks to Ken Emmer for supplying the microphone.
Web site: https://ericrowland.github.io
Video Information
Views
1.6M
Total views since publication
Likes
52.8K
User likes and reactions
Duration
14:47
Video length
Published
Sep 22, 2022
Release date
Quality
hd
Video definition
Captions
Available
Subtitles enabled
About the Channel
Tags and Topics
This video is tagged with the following topics. Click any tag to explore more related content and discover similar videos:
Tags help categorize content and make it easier to find related videos. Browse our collection to discover more content in these categories.