# Prime Numbers

1. Feb 26, 2005

### endfx

So I just heard about the new prime number that was discovered and for some reason got kind of interested in it.

So I'm looking at prime number tables on various webpages that show the prime numbers, dates discovered, etc.

I'm confused on what the "digits" column in these tables means.

For example, the prime number 5 has 2 digits, and the prime number 13 has 4 digits. What are these digit numbers?
How do you get 2 digits from the prime number 5?

Thanks.

2. Feb 26, 2005

### Muzza

Was this the list you were looking at? It doesn't say that 5 has 2 digits or that 13 has 4 digits, it says that 2^5 - 1 (i.e. 31) has 2 digits and that 2^13 - 1 (i.e. 8191) has 4 digits.

3. Feb 26, 2005

### endfx

The tables I was looking at were like that, but that wasn't the particular page I was viewing. But thanks for explaining it to me, as well, thanks a lot for that link. It like how it explains the history of primes and why they are imporant.

4. Feb 27, 2005

### Gokul43201

Staff Emeritus
endfx, you might want to Google "Mersenne Primes"

5. Feb 27, 2005

### strid

just read a on the net that there are only 41 such numbers!!

how come... cant you just insert any prime number into 2^p -1??

so if we want to find a BIG one we can take the present biggest and insert it into 2^p-1....or?

6. Feb 27, 2005

### Gokul43201

Staff Emeritus
Not all prime p in the above formula give Mersenne Primes. For instance (2^11)-1 = 2047 = 23*89

7. Feb 28, 2005

### shmoe

42 known now, see the GIMPS webpage (there's a recent post in this forum about it too). The known is an important distinction, there may be many more (possibly infinitely many).

8. Feb 28, 2005

### Galileo

$$2^{25,964,951}-1$$

It has 7,816,230 digits......yikes!

You can fill a phone book with it (I think).

Last edited: Mar 1, 2005
9. Feb 28, 2005

### Zurtex

I think you'll find you've added an extra 2 there and I really doubt it about the phone book, consider in England, way way over 1 million people have phones and we all have 11 digits (including area code).

10. Feb 28, 2005

### Icebreaker

Why is it yet impossible to devise a function which correlates a number with a prime number?

11. Feb 28, 2005

### shmoe

Why do you say it's impossible? let p(n)=the nth prime number, there's your function. There are also plenty of formulas that spit out primes, none really computationally useful though.

I took a look at my local phonebook (Toronto area) and it appears to hold something like 25,000 characters per page (roughly 200 across and 125 lines per page). So this new Mersenne prime would be over 300 pages, but the book itself has over 2000 pages. So it falls shot of the toronto phonebook size, but it's probably on par with some smaller canadian cities.

12. Feb 28, 2005

### Icebreaker

let p(n) = the nth prime number is useless in predicting the nth prime, if n > the largest prime we know

13. Mar 1, 2005

### shmoe

It's worse than that. We don't come anywhere near knowing all the primes less than the largest known one. My point was there are functions that map the naturals to the primes, there are even ones that look less cheap then my p(n) one. There are also asymptotics for p(n), and other formulas who output only primes, and that nasty polynomial in many (26?) variables whose positive values equals the set of primes. All are intersting, none really computationally friendly. Here's a nice collection from mathworld:

http://mathworld.wolfram.com/PrimeFormulas.html

14. Mar 1, 2005

### Galileo

Dutch phonebooks aren't that big
I checked. About 6000 numbers will fit per page and we have about 1000 pages. So roughly 6,000,000 digits will fit.
So in retrospect, the new Mersenne prime will fill a dutch phone book. :tongue:

15. Mar 5, 2005

### T.Rex

10 millions characters.

Since there is a prize of \$ 100.000 for the discoverer of a Mersenne prime number of more than 10 millions characters, GIMPS addicts are now searching with exponents larger than 34.000.000 . So, maybe M43 (or M44) could not fit in any phonebook on earth ...
See: Internet PrimeNet Server and : GIMPS .
Tony

16. Mar 5, 2005

### robert Ihnot

I think it useful to discuss what are the general capacities of "code crackers" to find prime factors in "large numbers." Well, about 20 years ago it was generally thought that if two 100 digit primes were multiplied together it was as a practical matter impossible to factor this 200 digit number. This fact was used in constructing secret codes.

Well, today on the internet I found this: This function creates keys using the method described in the Procedure section. It first generates two 100-digit prime numbers p and q by initializing them both to 10100 and incrementing them by 1 and -1, respectively. Each time they are incremented, they are tested for primality. In this way, p and q were found to be:....

The writer then is suggesting that as a general rule such 200 digit numbers can not be factored as a practical matter. http://ashvin.flatirons.org/projects/crackingthecode/results.html [Broken]

You have to understand that a Mersenne prime is a special case where mathematicians and programmers use special criterion to work with.

Last edited by a moderator: May 1, 2017
17. Mar 6, 2005

### T.Rex

True. But the Maths used for proving the primality of Mersenne numbers can be used for proving the primality of other kinds of numbers, like Fermat numbers, or many other numbers. But this kind of Maths seems to be less and less used and teached, as far as I know (but I'm NOT a mathematician). Don't know why.
Tony

18. Mar 6, 2005

### mathwonk

We have to also realize that code crackers are clever people, and if they know or suspect that two 100 digit numbers were used to generate the 200 digit product, it narrows down their search for factors. i.e. factoring a 200 digit number that was generated by msomeone purposely from two 100 digit numbers, is not as difficult as factoring an arbitrary 200 digit number. this is a current topic of research.

What Robert is saying is that if they also know the number is a Mersenne number, then the job of factoring it is even more restricted.

In fact 10 or 20 years ago, even factoring special 100 digit numebrs was pretty tough. But one of my friends programmed a chain of PC's to do it in a few months, working entirely at night when the PC's were not in use.

You also need to realize that the difficulty of proving a big number is prime is much much less than that of factoring a non prime number.

I.e. there are tests for primality that run hugely faster than factoring algorithms, due to special proeprties of primes numbers like the "Fermat little theorem". This particular property does not quite characterize primes, since some non prime numbers also obey the conclusion of fermats little theorem, but a small enhancement of it does so.

now there are much faster algortihms using elliptic curves, etc... that detect prime numbers.

so the job of proving a certain mersenne number is prime is nothing like the task of factoring one that is not prime.

Last edited: Mar 6, 2005
19. Mar 6, 2005

### robert Ihnot

Most people have difficulity understanding the vastness of numbers like a google. A 200 digit number is a google squared, not two google.

Suppose, we can check one number every second for primality of a 100 digit number, and say we check every 10th number, or better yet, every 100th number to use a figure, we would, using 365 days/yr, be working for 3.17 x 10^89 YEARS to check every such number for primality!

That's 10^99/(60x60x24x365x100) = 3.17x10^89!

Last edited: Mar 6, 2005
20. Mar 6, 2005

### Hurkyl

Staff Emeritus
There are less naive tests for primality, though. The best run in time that is polynomial in the number of digits, not in the number's size.