Jump to content

Prime Numbers calculation formula !!


TheScienceGeek

Recommended Posts

I would like to know is there an existing formula to find prime nos. ??

In either case I have come up with a formula... x/(x-1)! where x is the given no. to be checked !!

the ratio x/(x-1)! should be in its lowest terms by default ... also x should not equal to 2 !! then and only then it is a prime no. !!

Link to comment
Share on other sites

This is certainly true, but knowing whether the fraction is in lowest terms would involve knowing whether x is prime in the first place. Also, x can be 2, as our fraction then becomes 2/1! = 2/1, which is in lowest terms; though of course, we already know 2 is prime.

Link to comment
Share on other sites

This is certainly true, but knowing whether the fraction is in lowest terms would involve knowing whether x is prime in the first place. Also, x can be 2, as our fraction then becomes 2/1! = 2/1, which is in lowest terms; though of course, we already know 2 is prime.

What about this formula... if (x-1)!/x is an integer the no. x is not a prime no. :::::::: or else ...it is !?! [exception is no. 4]

Link to comment
Share on other sites

  • 10 months later...

I posted about prime numbers earlier today....

 

I came up with the idea of using frequency to find primes when I was in fifth grade, tested it with my brothers help about 10 years ago. I realized that if you created every frequency all prime numbers would cross only with the frequency of one, so prime numbers would only be resonate with a frequency of one.

.

My brother wrote a program to create a visualization of these frequencies and it worked well up to around 50,000 or so and then it took so long to generate it was not worth messing with.

.

We used every frequency from 1 to just about 50,000 and discarded all numbers with more than two frequencies crossing each other on the number lines. A simpler way to do it would be to eliminate the 1 frequency and then all primes would have only themselves and no others. This is not a formulae, but it does work to predict primes to infinity. Either way you would do it, you wind up with number two counting as a prime with this means it just has to be rejected.

Edited by MountainGuardian
Link to comment
Share on other sites

I would like to know is there an existing formula to find prime nos. ??

In either case I have come up with a formula... x/(x-1)! where x is the given no. to be checked !!

the ratio x/(x-1)! should be in its lowest terms by default ... also x should not equal to 2 !! then and only then it is a prime no. !!

How do you read that formula in words? I don't know what the math is and I'd like to look it up so can you tell me what the ! is doing please?

Link to comment
Share on other sites

 

x over x minus 1 factorial

thank you.

What about this formula... if (x-1)!/x is an integer the no. x is not a prime no. :::::::: or else ...it is !?! [exception is no. 4]

Take x = 11 is that formula then 10 factorial divided by 11? my Excel did not come out to an integer. What am I doing wrong?

Link to comment
Share on other sites

Precision and care is needed in maths.

 

Firstly, in your two quotes above of the science geek the formula he refers to are different.

 

Secondly, surely that is what he says; if the answer is an integer the number is not a prime. Your number is a prime and the answer is not an integer. If you do it with 9 you get 8!/9 which must be an integer (there are two factors of three [3*3]on the bottom and two [8*7*6*5*4*3*2*1) on the top.

 

Thirdly, John has already explained that this must work but that it is not interesting. To know if the division gives an integer we have to do the division which is more time consuming that other methods of checking for primes if done in full, or relies on the knowledge (like my explanation above) of what the factors are already (ie that it isnt prime)

Link to comment
Share on other sites

Precision and care is needed in maths.

 

Firstly, in your two quotes above of the science geek the formula he refers to are different.

 

Secondly, surely that is what he says; if the answer is an integer the number is not a prime. Your number is a prime and the answer is not an integer. If you do it with 9 you get 8!/9 which must be an integer (there are two factors of three [3*3]on the bottom and two [8*7*6*5*4*3*2*1) on the top.

 

Thirdly, John has already explained that this must work but that it is not interesting. To know if the division gives an integer we have to do the division which is more time consuming that other methods of checking for primes if done in full, or relies on the knowledge (like my explanation above) of what the factors are already (ie that it isnt prime)

Thanks.

Link to comment
Share on other sites

There's another famous totally accurate but completely useless test for primality.

 

Wilson's theorem says that [math]n[/math] is prime if and only if [math](n - 1)! \equiv -1\pmod n[/math]. The problem is that computing [math](n - 1)![/math] is even worse computationally than doing trial division. There's actually some theoretical interest to this because Wilson's theorem has other uses in number theory.

 

https://en.wikipedia.org/wiki/Wilson's_theorem

Edited by wtf
Link to comment
Share on other sites

There could be an interesting side line in prime number theory - tests that are completely accurate, provable, not able to be easily to be reduced to a simpler test, YET are completely useless

 

also known as doing a wilson :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.