mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Miscellaneous Math

Reply
 
Thread Tools
Old 2017-02-25, 17:07   #1
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Out of my Body

111000100012 Posts
Default Largest Primorial that would Fit on a Terabyte Drive.

Hi all,
What would be a good estimate for the largest prime of the largest primorial that would fit on a terabyte dive?
Thank you in advance.
a1call is offline   Reply With Quote
Old 2017-02-25, 17:24   #2
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

20C016 Posts
Default

Quote:
Originally Posted by a1call View Post
Hi all,
What would be a good estimate for the largest prime of the largest primorial that would fit on a terabyte dive?
Thank you in advance.
probably would depend on format for example 2*3*5= 11110 in binary which could be brought down to 1(4)0 which isn't any shorter in this case but in larger cases if this happened to be more than 4 it would start to be more efficient to compress it.
science_man_88 is offline   Reply With Quote
Old 2017-02-25, 17:35   #3
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Out of my Body

33×67 Posts
Default

Hi SM,
I am looking for a rough estimate. The base of the number should not make much of a difference. Compression will, but only by a few orders of magnitude at its best.
So let's say decimal digits stored without compression.
I will be happy with a reasonable upper bound for the largest prime factor of the primorial that would fit on a terabyte dive.
a1call is offline   Reply With Quote
Old 2017-02-25, 17:52   #4
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Out of my Body

33·67 Posts
Default

Let's break it down:
How many decimal digits can be written to a terabyte dive without compression?
a1call is offline   Reply With Quote
Old 2017-02-25, 17:56   #5
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

Quote:
Originally Posted by a1call View Post
Hi SM,
I am looking for a rough estimate. The base of the number should not make much of a difference. Compression will, but only by a few orders of magnitude at its best.
So let's say decimal digits stored without compression.
I will be happy with a reasonable upper bound for the largest prime factor of the primorial that would fit on a terabyte dive.
well each character is one byte and you'd have to account for EOF markers etc. but basically you're asking a terabyte has 10^12 bytes (more than 10^3 digits looks to take about 352 primes, 10^4 takes up to 2586, working on more data but already see your new post and have it answered in theory, 230567 for 10^5 digits) how many primes do I have to multiply together to fill that ? or what is the primorial prime that would fit? here's a question to start you off what happens when you multiply two n digits numbers ( or an n digit number with an m digit number) what number of digits is their product?
science_man_88 is offline   Reply With Quote
Old 2017-02-25, 18:04   #6
xilman
Bamboozled!
 
xilman's Avatar
 
May 2003
Down not across

32×11×101 Posts
Default

Quote:
Originally Posted by a1call View Post
Let's break it down:
How many decimal digits can be written to a terabyte dive without compression?
If you store one digit per byte you are asking, in effect, for the largest primorial with not more than 1e12 digits. The decimal logarithm of this number is, of course, 1e12

Now write yourself a little program which sums the decimal logarithm of the successive prime numbers and stop when the sum exceeds 1e12. Barring rounding errors, which I will leave you to think about, you then have your answer.

Rounding errors will be severe, so you are still going to have to do some thinking to get an accurate answer. I'm prepared to give you a hint but not do all the work for you.

Note to real mathematicians: there are much better approaches but those take more thinking ability than a1call has demonstrated so far in public.

Last fiddled with by xilman on 2017-02-25 at 18:09 Reason: Add note.
xilman is offline   Reply With Quote
Old 2017-02-25, 19:13   #7
Dr Sardonicus
 
Dr Sardonicus's Avatar
 
Feb 2017
Nowhere

3,251 Posts
Default

xilman said: If you store one digit per byte you are asking, in effect, for the largest primorial with not more than 1e12 digits. The decimal logarithm of this number is, of course, 1e12

Taking 1e12 as a ballpark figure for the base-ten logarithm makes sense. Of course, given that kind of bound, figuring out (at least approximately) the size of the largest prime whose primorial isn't any larger is one thing, and actually determining all the primes up to that point and then multiplying them together, is quite another. How long might that take? My guess is, "WAY too long to worry about writing the answer to a drive."
Dr Sardonicus is offline   Reply With Quote
Old 2017-02-25, 20:09   #8
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Out of my Body

34218 Posts
Default

Thank you for all the replies.
I have always disliked the e in scientific and engineering notations. So let's say the primorial can have 1T dd.
Now roughly for what size of p would p# have 1T dd?
Now for a very rough estimate (that suits me just fine) I get.
p^x=10^(T-1)
p^x=10^T
And I don't know how to go further with 2 variables and one equation.

Last fiddled with by a1call on 2017-02-25 at 20:10
a1call is offline   Reply With Quote
Old 2017-02-25, 20:23   #9
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Out of my Body

34218 Posts
Default

I think the next equation I need is the number of primes less than n.
Isn't that ln(n)?
Corrections are appreciated.
p^x=10^T
p^ln (p)=10^T
Anyway this can be calculated without programming?

Last fiddled with by a1call on 2017-02-25 at 20:30
a1call is offline   Reply With Quote
Old 2017-02-25, 20:25   #10
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

Quote:
Originally Posted by a1call View Post
Thank you for all the replies.
I have always disliked the e in scientific and engineering notations. So let's say the primorial can have 1T dd.
Now roughly for what size of p would p# have 1T dd?
Now for a very rough estimate (that suits me just fine) I get.
p^x=10^(T-1)
p^x=10^T
And I don't know how to go further with 2 variables and one equation.
I would think something like log_10(p^x)=T though you change from T-1 to T


my logic was that an n digit number times an m digit number can give at most a n+m digit number ( or roughly like that) so if you knew the number of primes with a certain number of digits ( in PARI/GP primepi(10^x)-primepi(10^(x-1)) ) you could add x that many times for an upper bound on the number of digits added when you multiply by the product of all the primes in that range. ( my math has up to 10 digits only giving about 4.5 *10^9 so a long way to go potentially.)
science_man_88 is offline   Reply With Quote
Old 2017-02-25, 20:28   #11
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

22·5·293 Posts
Default

Quote:
Originally Posted by Dr Sardonicus View Post
Of course, given that kind of bound, figuring out (at least approximately) the size of the largest prime whose primorial isn't any larger is one thing, and actually determining all the primes up to that point and then multiplying them together, is quite another. How long might that take? My guess is, "WAY too long to worry about writing the answer to a drive."
The hardest part would be coding the on-disk multiplications which I'm sure would be a pain. You start by sieving out a range of primes as large as memory allows, then multiplying together with binary splitting, then write the product to disk. Continue with the next range of primes until the drive is full. Then multiply the numbers you wrote to disk by each other by binary splitting, using memory and a second drive as scratch space as needed. You'll probably need a final multiplication by a relatively small number (the product of the remaining primes) to finish off the process.

I don't know how long these multiplications would take; they are huge compared to any benchmarks I've seen.
CRGreathouse is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Largest Known Primorial a1call Miscellaneous Math 11 2016-12-14 21:35
primorial primes jasong Math 1 2006-08-12 01:38
Primorial puzzle Citrix Puzzles 3 2006-03-07 15:07
Primorial question Dougy Math 2 2005-07-28 13:13
need Pentium 4s for 5th largest prime search (largest proth) wfgarnett3 Lounge 7 2002-11-25 06:34

All times are UTC. The time now is 06:43.

Fri Jun 5 06:43:52 UTC 2020 up 72 days, 4:16, 0 users, load averages: 1.34, 1.08, 1.03

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.