Jump to content

Prime Numbers Formula :


Amod

Recommended Posts

Seeing as I have no background in prime numbers I'm sure I'll come across as an idiot, but that's okay with me as long as I learn something new.

 

Anyway, I don't understand this search for the highest prime number. If a prime number is divisible by only itself and the number 1, then doesn't the following example describe the highest prime number?

 

If you started writing the number nine at the very beginning of time, and then at the very end of time you placed a 7 on the end of those nines, wouldn't that be the largest prime number?

 

999-infinity-7

Edited by Jiggerj
Link to comment
Share on other sites

Yep - you do have to check still. There are some very good checking algorithms - which I believe are less intensive for potential mersenne primes than for other candidates. All the really big primes are mersenne. If you have spare cpu cycles that you are willing to share - http://www.mersenne.org/

 

The largest known prime is a Mersenne prime.

 

But it is unknown whether the number of Mersenne primes is infinite or finite. It is easy to prove that there are infinitely many prime numbers. So it is not fair to say that "all the really big primes are Mersenne primes.

Link to comment
Share on other sites

The largest known prime is a Mersenne prime.

 

But it is unknown whether the number of Mersenne primes is infinite or finite. It is easy to prove that there are infinitely many prime numbers. So it is not fair to say that "all the really big primes are Mersenne primes.

 

You're right - I was not precise; all the really big primes so far discovered are Mersenne primes and were tested because they might be a Mersenne

Link to comment
Share on other sites

Seeing as I have no background in prime numbers I'm sure I'll come across as an idiot, but that's okay with me as long as I learn something new.

 

Anyway, I don't understand this search for the highest prime number. If a prime number is divisible by only itself and the number 1, then doesn't the following example describe the highest prime number?

 

If you started writing the number nine at the very beginning of time, and then at the very end of time you placed a 7 on the end of those nines, wouldn't that be the largest prime number?

 

999-infinity-7

 

 

No.

 

For starters, 999...7 is not a number that can be factored to establish its primality.

 

The ONLY way this would be a true statement is if you provided a mathematical proof that showed that all variations of 999...7 were prime no matter how many 9s were used. Good luck with that!

 

(note: 9997 is not prime)

Link to comment
Share on other sites

  • 5 weeks later...

It works pretty often, but not always. You still have to check that the output is prime.

=Uncool-

 

Mersenne numbers are not actually to generate prime numbers, but using the generated prime numbers to obtain perfect numbers from this formula

2p−1(2p−1) where p is a mersenne prime number.

ex: when p=2 > 2^1*(2^2-1)= 6

6 is a perfect number because a perfect number is when the sum of its factors (except the number itself) is the number it self

6= 1*2*3 > 1+2+3=6

 

 

 

 

Link to comment
Share on other sites

  • 2 weeks later...

Seeing as I have no background in prime numbers I'm sure I'll come across as an idiot, but that's okay with me as long as I learn something new.

 

Anyway, I don't understand this search for the highest prime number. If a prime number is divisible by only itself and the number 1, then doesn't the following example describe the highest prime number?

 

If you started writing the number nine at the very beginning of time, and then at the very end of time you placed a 7 on the end of those nines, wouldn't that be the largest prime number?

 

999-infinity-7

 

 

 

the greatest prime number has nothing to do with what you said. lets say the number 999......7 is a prime number as you said however if you multiply all the prime numbers until 999....7 and add 1 you would still get a prime and bigger than yours and you can infinitely do that operation.

 

 

Link to comment
Share on other sites

the greatest prime number has nothing to do with what you said. lets say the number 999......7 is a prime number as you said however if you multiply all the prime numbers until 999....7 and add 1 you would still get a prime and bigger than yours and you can infinitely do that operation.

 

 

 

 

He's thinking of infinity as a number that can be expressed in base 10. Therefore, if given a FINITE number of digits to transcribe (since you are constrained by the beginning and end of time), the largest possible number that you can write which is not obviously composite is 9999...7.

 

After all, 9999...9 is always divisible by 3, and 9999....8 is always divisible by 2.

 

But observe this.

A problem with 9999...7 is that every 6th iteration of it is divisible by 7. Starting with the 8th iteration (999999997) and every 12th afterwards is divisible by 13. Starting with the 10th iteration and every 16th afterwards is divisible by 17. Starting with the 4th iteration and every 18th afterwards is divisible by 19. Starting with the 19th and every 22nd afterwards is divisible by 23.

 

As you can see, there is a sieve effect working here so that no prespecified combination of infinitely repeating digits can be guaranteed to be prime. This means there is nothing special about 999...7 besides the obviousness that it is never divisible by 2, 3, 5 or 11.

 

Therefore, because of the asymptotic law of the distribution of primes, it is unlikely (i.e. 1/ln( 10(999...7) ) that the final 999...7 number (or any other chosen number with that magnitude) would be prime.

 

For example, if you could write out 10^40 digits, there's essentially a 0% chance that the number would be prime, even after adjusting the sieve to account for the absence of 2, 3, 5 and 11.

 

I hope that makes sense!

Edited by baric
Link to comment
Share on other sites

  • 3 weeks later...

1. Take the number which to want to check

2. Start a loopfrom this number-1 till 2

3. Inside the loopscheck if the given number is divisible by any of the numbers in loop.

4. If yes, thenflag = 1 and break from the loop (flag is a normal int or bool variable)

5. Else, flag = 0,continue;

6. Outside the loopcheck if flag = 0 or 1, if 0 then number is prime else not prime

 

PS Make sure youare breaking from the loop if the number is divisible

To check if n is prime, you only really need to check if it's divisible by numbers between 2 and sqrt(n). And even then you can be wasting a fair amount of time by checking every single potential divisor in that range.
Link to comment
Share on other sites

To check if n is prime, you only really need to check if it's divisible by numbers between 2 and sqrt(n). And even then you can be wasting a fair amount of time by checking every single potential divisor in that range.

I think you really just need to check if it's divisible by prime numbers between 2 and sqrt(n). That could save a little time.

Link to comment
Share on other sites

  • 1 year later...

The little I know about primes is that there is no any 'Systematic Formula' for obtaining prime numbers in either ascending or descending order.And the whole world is in a delima as wheter there is a limit to primes or NOT.That is whetther there is a HIGHEST PRIME NUMBER.

I have Good, Better and Best formulae for generating Prime Numbers systematically.

TRY THE GOOD ONE:

P=7d-4

Where: P=prime number(Needed)

d=odd number(Chosen)

Example:

At d=5, it means;

P=7(5)-4=35-4=31

there are a few exceptions for the Good formula.

Questions and contributions are welcome

<link removed>

Edited by imatfaal
Link removed by mod
Link to comment
Share on other sites

!

Moderator Note

 

Princeps,

 

If you wish to discuss your claimed formula - or put it up for scrutiny then feel free to post it here or open a new thread in speculation. But we frown upon posts which merely link to a users blog

 

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.