mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Lone Mersenne Hunters (https://www.mersenneforum.org/forumdisplay.php?f=12)
-   -   MM127 (https://www.mersenneforum.org/showthread.php?t=16435)

LaurV 2012-01-11 02:39

[QUOTE=Mini-Geek;285646]
Don't worry, it compresses very well. :wink: In fact, with the right algorithm, (i.e. "where the bytes of the file as a number are x, calculate MMx") you can store it in a single byte: 01111111.[/QUOTE]
Hehe, right! Even on a single bit, with "the right" algorithm (like "MMMMM[TEX]\pi_x[/TEX]") :razz:

TimSorbet 2012-01-11 03:46

[QUOTE=LaurV;285838]Hehe, right! Even on a single bit, with "the right" algorithm (like "MMMMM[TEX]\pi_x[/TEX]") :razz:[/QUOTE]

I stopped at MMx because it fit in one byte, and it wasn't SO specific that it was really only intended for this. E.g. any currently-known double Mersenne could be referred to using <= 4 bytes (i.e. an unsigned 32-bit integer, maxing at p=2[SUP]32[/SUP]-1~=4.3 billion). That could be reduced to 3 bytes by making it MM[TEX]\pi_x+1[/TEX] (+1 because there is no 0th prime; so rather than make the "convert file to number" concept more complicated, I'll just add 1). In fact, this could refer to future Mersenne doubles <= M310248241 ([URL="http://primes.utm.edu/nthprime/"]the 2[SUP]24[/SUP]th prime[/URL]) with just 3 bytes! The trouble with this method (using pi(x) in the calculation) is that it can now require some real work just to get p (sure, an efficient sieve can find that in no time, but you still have to correctly implement, or find, an efficient sieve). I think we can spare the extra byte.
:max:


All times are UTC. The time now is 13:22.

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