Is there a formula for primes ? (Spoiler: YES and NO)
Is it possible to define a formula which produces distinct prime numbers only ? Many great mathematicians including Euler attempted this question and in this video we consider various formulas they have achieved.
Check out my video on big Mersenne primes: • Win 250 000 $ for find...
My free consultation service: forms.gle/KoBA7TurwLjteMHcA
Accepting bitcoin donations: 1LfLNqxJ38n4g8wwodFzmvrq8YxXNSF2vf
#primenumbers
Пікірлер: 113
Like if you understand what happens at 3:48 !
@swartzsteinswartzstein8809
3 жыл бұрын
What is it??? tell me please :3
@marcandruu
3 жыл бұрын
is that graph the ulam spiral?
@proloycodes
3 жыл бұрын
goldbach conjecture?
@keymasta3260
3 жыл бұрын
Kitchen tablecloth in polka dots. I have one like this
@rajendrasrirapuram6284
2 жыл бұрын
3÷48
It's actually not hard to come up with a formula for prime numbers. The difficulty is making an easily computable formula which possibly tells us something about the structure of prime numbers. Probably the best example of this kind of formula is probably Riemann's exact formula for the prime counting function using roots of the zeta function.
@nathansatnarain9079
4 ай бұрын
No it's no proof it has or has not a structure. Up for the future mathematicians!
f(x)=2 Where's my prize?
@MrCocktaiI
3 жыл бұрын
The fact that it's obvious that he implicitly demanded injectivity yet you still insisted on the technicality tells me you're a true mathematician
@NateROCKS112
3 жыл бұрын
@@MrCocktaiI he said "different prime number," which automatically means injectivity.
@MrCocktaiI
3 жыл бұрын
@@NateROCKS112 True. I only looked at the text again to make sure, but he does indeed say it. No prize for me either, I guess. :(
@raphner2759
3 жыл бұрын
@@NateROCKS112 well f(2n)=2 and f(2n+1)=5
Saw a recent video about this topic. Seeing as you mentioned the floor function, I think Willans' formula qualifies. The nth prime, p = 1 + sum[i=1, 2^n]{ floor( { n / ( sum[j=1, i]{ floor[ cos^2( pi * { [j - 1]! + 1 } / j ) ] } ) } ^ 1/n ) } where { (j - 1)! + 1 } / j detects if a number, j, is prime because only primes will evaluate to an integer, cos^2(pi * the above) gives us positive 1 for ALL integer multiples of pi, floor(the above) erases all of the non-integer values of j for the count below, sum[j=1, i](the above) counts how many primes we've found up until i, n / (the above) is > 1 if we haven't found n primes yet, (the above) ^ 1/n gives us 1 if we haven't found n primes yet and 0 afterwards, 1 + sum[i=1, 2^n](the above) counts to the nth prime. For fun, since sums act like loops, I optimized this to a single loop that terminates early when it detects that first 0 that occurs at the nth prime and removed the cos as it's easy for programming languages to detect integers (I whipped this up in Python). It's by no means efficient and still suffers from using a VERY large factorial after only 15 iterations, but it will successfully produce a mapping from N -> N as described at 0:16.
@kdee1428
Жыл бұрын
Yesterday i was watching that Wilan's formula video lol
@el_saltamontes
Жыл бұрын
@@kdee1428 Same here, love these
@angularpy
Жыл бұрын
watched it a few hours ago. was a great video with good animation. edit: kzread.info/dash/bejne/nGmnksptYqrMprA.html
@wcsxwcsx
Жыл бұрын
That fact that Willans' formula is hard to calculate wasn't his problem. I assume modern computers can handle it pretty well.
@angularpy
Жыл бұрын
@@wcsxwcsx nope even with power of todays computers it is hard to calculate 1000th prime using W. nth prime formule.
@ You forgot to say that low computational complexity is a must. A naive algorithm O(n*sqrt(n)) can easily be written as an equation.
The thing about math prizes is that you'd be way further ahead to understand the applications of the breakthrough and create products from the breakthrough yourself.
There is nearly two thousand years between Euclid and Mersenne, whose work gave the Mersenne primes their name, so what were these numbers called before Mersenne's time?
So apparently that William Mills guy made A formula (no pun intended) and he just leave it there to some other mathematicians to figure it out. What a responsible man.
40 squared plus 40 plus 41 equals 41 squared, therefore it is not prime. The second term of your polynomial should have a minus sign.
@MetaMaths
3 жыл бұрын
sorry, it works up to 39 !
@ValkyRiver
Жыл бұрын
@@MetaMaths This video is about Wilan’s formula kzread.info/dash/bejne/nGmnksptYqrMprA.html
One thing that will improve your english is to focus on stress timing. English is a stress-timed language in which each word is intrinsically assigned one stress, even though we never write it. CONstruct (a building, perhaps, or an idea) conSTRUCT (to build, assemble) comPOSite (as opposed to COMposite)
As well as Willans' formula, Jones et al. (1976) also provided a formula for all primes. The only down side is that it also can give negative numbers, which must be ignored.
@gigantopithecus8254
Жыл бұрын
so use the ramp function on it
@speakingsarcasm9014
Жыл бұрын
It's not a true formula... It's basically loops and conditions pretending to be formula...
Willans' formula works, if you don't care about efficiency (a big 'if').
@nynirf975
3 ай бұрын
A infinitely big if
could you do a video about the link between primes and perfect numbers?
Hope I will do this
Isn’t 40^2 +40+41=41^2?
4:54 how can that be true if in the arithmetic progression of 1, 2, 3 ,4 … there are primes that appear even though they share common factors with other numbers?
I couldn't locate any formula that can find the nth term of a prime sequence
What about Willans' formula?
you can use the wilson formula with n+1 steps to get a sequence of answers "is this number a prime", and use exponent sum expansion of the product of factorial to get step-wise incremental factorial
@Jkauppa
Жыл бұрын
ie, inverse of wilson's theorem is the prime generator function, giving all the numbers in 1,2,..n sequence that give the -1 | mod n answer to the (n-1)!
@Jkauppa
Жыл бұрын
ie you get a 0-1 decision pattern from the wilson theorem (n-1)! === -1 | (mod n), and all the prime properties from that equation
There is a function related to a constant similar to the Mills' constant and its function. There is a video about it on Numberphile from 26th November, 2020, called "2.920050977316 - Numberphile" (spoilers: that's the first few digits of the irrational constant).
The formula : (.75*(x^2))+(1.5*x)+23 = a lot of Eisenstein prime numbers when x is an even number, more than 60 %.
Have you taken in consideration the prime counting function?
@MetaMaths
3 жыл бұрын
how can it be useful here ?
A better formula, or mapping, would be if the function produced a 1 if n is prime and 0 if n is composite. RJ
I believe that the quadratic polynomial should be n^2 - n + 41 and not n^2 + n + 41
Better than Willan’s, “my” function f(p)->Prime is shorter and faster, it gives either 2 or an odd prime P. It reads f(p)=1+(p-1)^[detect], where detect=( (p-1)! mod p )/(p-1), hence [detect]=1 if p is prime, or zero if p is composite, hence f(p) = 1+(p-1)^(1or0) =odd Prime or 2. 😂
@arunprasad1022
Жыл бұрын
Actually you are just using wilson's theorem and also you formula is a prime detector not even a prime function. Also your function isn't even correct and the correct function is already been found which is suspiciously similar to yours, it goes like this floor((p! mod (p+1))÷(p))×(p-1)+2 so your formula is completely invalid, not invented by you and not actually a prime function
@rafiihsanalfathin9479
Жыл бұрын
@@arunprasad1022what a burn😂
Could it help in factoring if you know how to generate the prime sequence?
At 1:49, my brain said "the natural numbers!"
I have absolute formula , tell me how much will be sell price ?
@sing5seconds
Жыл бұрын
you cant sell it but you can be very Famous and get millions if you solve one of RSA Factoring Challenge ! this will prove your formula is correct.
I thought you would mention the polynomial created by Davis, Matijacevič, Putnam and Julia Robinson whose set of positive values as it ranges over the nonnegative integers is exactly the prime numbers.
@xCorvus7x
3 жыл бұрын
Where could I find more info about this?
@raphielohnef4678
3 жыл бұрын
@@xCorvus7x Google "Prime Diophantine Equations". The formula is simply a different representation of these.
Tis is good video
1:54, Aren't the natural numbers such a sequence?
@MetaMaths
3 жыл бұрын
It is, but I guess my point was to try and make this sequence dense with primes. Sorry, my mistake !
I'm no mathematician, but have come across this, prime numbers are obviously only numbers ending in 1, 3, 7 and 9, and of those only the multiples of a prime will not be prime , can't a formula be construed from that? Or am I being very naive? Sam Knysna SA
this is real interesting! not to be pedantic, but isn't the simplest example of a function containing infinitely many primes just... the natural numbers mapped to themselves?
@MetaMaths
Жыл бұрын
You are right, but it is a very boring sequence ) we are looking for something with a high “density” of primes
@SunroseStudios
Жыл бұрын
@@MetaMaths that's fair! what do you define as high density though?
5:11 left guy is mad einstein
Actually 2^11-1 and 23*47 are different numbers: 2047 and 1081 respectively…..
I think primes detection is an NP problem.
i have a formula which can tell if any given number is prime or not. how can i get some glory if there's any to get? i can tell you formula
@sing5seconds
Жыл бұрын
you cant sell it but you can be very Famous and get millions if you solve one of RSA Factoring Challenge ! this will prove your formula is correct.
Prime number equation [(n-2)!-1]÷n=whole number
@richardl6751
9 ай бұрын
If that works it will put your name into history and you will become insanely rich. Better publish it somewhere before someone steals it.
How 5 and 13 can come from 2^n -1? Wrong
2^5 -1=31,so 5 it's mersenne prime but 5×6/2=15,and 15 it isn't a perfect number?
@nynirf975
3 ай бұрын
You need to multiply not the power of two ,but the mersenne prime itself. 2^5-1=31 which is prime so 31*32/2=496 which is perfect number. 496=248+124+62+31+16+8 +4+2+1
Primes...plural
4:09 I'm sorry to tell you but 40^2+40+41 is not prime. It's 41^2.
@nynirf975
3 ай бұрын
Agree
Of course not....I see,.... circular
Prime number formula - n/40×15+1. The number should be divisible by 40. This is approx method .
Plz note : digital root of every prime (except 3) is 1or2 or 4or8 or 5 or 7 . DrRahul Rohtak India.
2, 3, (5+6x), (7+6x) are all the primes to infinity, where x is integers 0 to infinity. Yes, there are non-primes in the bunch, but they can be 'filtered out' preemptively using (5+6x) and (7+6x) as products of the list of prime candidates. 'Sieve of Eratosthenes' inside-out. What it cannot do is 'test' an arbitrary number to see if it is prime. Bonus! It provides a mechanism to explain 'twin primes'. [Yes, there are an infinite number of twin-primes]
The significance of 41 is that it is one less than the answer to the ultimate question of life, the universe and everything.
@particleonazock2246
3 жыл бұрын
The significance of this comment is infinitesimally small compared to the ultimate question of life, the universe and everything.
Imagine Quantum computer "inventing" it.
this is so time twisted.
easy f(n) = n there you go infinite primes
I‘m sorry but your question is fundamentally flawed, of course such a function f:N->N exists simply defining f(x)=(x+1)th prime.
@spaghettiking653
3 жыл бұрын
At that point, just say f(x) = xth prime, and done and dusted. That just isn't a formula, though, so, no, the question isn't flawed, as it's asking whether some formula exists for primes - not some function.
@matron9936
3 жыл бұрын
@@spaghettiking653 it is flawed as the question was if such a function exists, not whether you can write some „formula“ for it. Also in your answer there is big ambiguity of what you mean by formula. Of course it‘s reasonable investigating the prime numbers looking for patterns, but that’s not a question you can ask like that.
@spaghettiking653
3 жыл бұрын
@@matron9936 Isn't the title, "Is there a formula for primes?" All I'm saying is, "f(x) for all f(x) that are primes" is not really a formula, don't you agree? Otherwise, it looks like there isn't a formula (where you can plug in some number and see it spit out an answer) to generate *every* prime number, which is what I took away from this video. Who knows, maybe we'll find one?
@matron9936
3 жыл бұрын
@@spaghettiking653 What I‘m saying is that it is a formula indeed
@spaghettiking653
3 жыл бұрын
@@matron9936 My bad then, I guess what I'm saying is, that formula isn't ideal cause you can't actually use that definition you gave to compute a prime number. What I was thinking by 'formula' was some function where you can plug in some x and receive some kind of prime. Defining a function that does that is all well and good, but you still run into the problem of needing to implement how that works in the first place. Otherwise, you can't just use logic to find a prime number. You would need some form of computation, which is what the formulaic approach is surely trying to avoid. Like summing all numbers from 1 to n, there is a more convenient way to do it than the operation itself (just use formula). Same story is seemingly what we're trying to do for primes. What is the nth prime? Instead of trying to compute, why can't we just plug into some formula that tells us the answer? That's why this formula of yours doesn't make sense in my eyes