2^74207281-1 is Prime
mersenne.org
mersenne.org
"The official discovery date is the day a human took note of the result. This is in keeping with tradition as M4253 is considered never to have been the largest known prime number because Hurwitz in 1961 read his computer printout backwards and saw M4423 was prime seconds before seeing that M4253 was also prime."
if result is true:
write_to_a_file(result)So, let's see your proof.
If you further claim that this objects are, like, sentient... I guess this would be too Pythagorean for my tastes. ;)
The number is 2^74,207,281 - 1. Naively stored like a normal integer in memory, that's roughly 75 MB of RAM just to store the number. Compare that to your 64-bit time_t and imagine how long a duration of time could be represented by such a large number. Stored on 3.5" floppy disks for some reason, that's roughly 50 disks just to store the number.
Edit: Duh, bits, not bytes. I leave my mistake here for posterity.
EDIT: I have realized my mistake in the representation of 2's complement. However, I will leave this here for posterity.
So it's 74,207,279 squares using FFT, each likely more than 75 MiB since there will likely be lots of leading zeros (we're probably close to the maximum number of digits using double precision, round off errors dominate unless you start using really small bases and even greater-length FFTs).
That's not counting the two or three compositeness tests that GIMPS uses before starting the Lucas-Lehmer test to prove primality.
For several years I've been working on a program to test for primality of the Generalized Fermat numbers, using NTT instead of FFT. NTT is exact (integer math), and the GFNs likely are more "dense" with primes than the Mersenne Numbers. And they also have a faster form to test, although the primality test has a 50% chance of false negative, so you have to run it a few times to be sure a number isn't prime. That's where Mersenne Numbers are easier to test.
Not that it's the most efficient representation at all, 74207281 fits in 4 bytes.
Oh, and I also forgot to mention that the guy used `tar` for compressing one file. I'll see myself out.
H4sICBPHnlYCA2EuYmluegDt0LENQQEUQNHnK7xINF8rLIAVbKH88VU0ZlATK4gt1DQ6vURMoBID
iN4CknOa29/BNrN72U+LZj2eL1fxPDU6EXE+3CbvUTEMAAAAAAAAAODfPfq9/DZfx6petw2B32Z5
XZT31mYXH9vDv0RTIwAAAlso it could be compressed even further. All you need is a computer program that prints "1", 74 million times.
You just need a computer language that can interpret bignum math equations.
echo "H4sICBPHnlYCA2EuYmluegDt0LENQQEUQNHnK7xINF8rLIAVbKH88VU0ZlATK4gt1DQ6vURMoBIDiN4CknOa29/BNrN72U+LZj2eL1fxPDU6EXE+3CbvUTEMAAAAAAAAAODfPfq9/DZfx6petw2B32Z5XZT31mYXH9vDv0RTIwAA" | base64 --decode | gzip -d | gzip -d | xxdDecompressing it, on the other hand, would be pretty slow however. Are primality tests O(n) or O(nlogn)? That puts decompression up to O(n^2) without a pre computed lookup table.
So with the kth prime ~= k log k, the ratio of primes is 1 / log k. Yes that drops to zero, but very slowly.
You can use the upper bound of the kth prime to build a sufficiently large sieve, which can be done O(n).
You can encode the Mth Mersenne with the integer M.
(It may never happen, though; according to Wikipedia, random quantum fluctuations may be sufficient to produce another Big Bang in a mere 10^10^56 years.)
Everybody contributes to the MP for free but that doesn't mean there isn't any value involved. It's a donation of sorts.
So, nothing. The alien could say "Oh yeah, we have 2^34240923842043983204982-1" and they could be absolutely correct but there's nothing we could do to know.
Or, if their number was big but not that big, it might be able to be verified in, say, a year, in which case it might win the EFF's prize and could possibly get some other sort of prize money. So, $150k + some undefined amount.
The proof is left as an exercise for the student.
To check, 2^6-1=63 is divisible by three (it might work), but 2^9-1 has a sum of 12 and a value of 511, which is not divisible by three (it's 170 * 3 = 510 + 1).
That's how you solve all problems of this form. For any a and b, a^n mod b eventually becomes periodic as n grows. It's easy to prove because there's only a finite number of possible remainders mod b. As an exercise, calculate 3^1000000 mod 7.
3 is prime. 34240923842043983204982 is divisible by 3 - 1 = 2.
ab mod n = [a mod n * b mod n] mod n
So, we can automatically infer that 2 ^ 34240923842043983204982 ~= 1 mod 3.
After subtracting 1, it will be divisible by 3.
Alternatively, you could notice that 2 ^ 2 ~= 1 mod 3, which implies 2 ^ 4 ~= 1, 2 ^ 6 ~= 1, so 2 ^ all even powers will be congruent to 1 modulo 3.
So 2 ^ x - 1 will always be divisible by 3 for even x.
EFF has a bounty for large prime numbers: https://www.eff.org/awards/coop
"The EFF awards are about cooperation," said John Gilmore, EFF co-founder and project leader for the awards. "Prime numbers are important in mathematics and encryption, but the real message is that many other problems can be solved by similar methods."
Finding these prime numbers will be no simple task, given today's computational power. It has taken mathematicians years to uncover and confirm new largest known primes. However, the computer industry produces millions of new computers each year, which sit idle much of the time, running screen savers or waiting for the user to do something. EFF is encouraging people to pool their computing power over the Internet, to work together to share this massive resource. In the process, EFF hopes to inspire experts to apply collaborative computing to large problems, and thereby foster new technologies and opportunities for everyone.
Considering how much more electricity a running computer uses versus an idle one and how much faster consumer CPUs degrade under load this definitely seems like a huge waste of resources for something that has little, if any, utility.
You would kind of expect that something so elementary should be easily predictable, or follow a pattern. But while we've found some similarities (like the mersenne primes) there's still a kind of nagging feeling that there should be a more basic way to enumerate prime numbers than guess and check.
We've learned some simple things about them, such as the existence of Mersenne primes, or ideas on the probability of any given number being prime being inversely proportional to its logarithm.
But I think the biggest thing is that it's a puzzle. But a puzzle that bothers us because it seems like it should be easy to solve, but it's not.
Finding larger prime numbers tells us more about them. It lets us see other parts of patterns. Patterns that might lead to some insight on how to predict if a number is a prime, or how to factor large numbers. This might have an impact on cryptography for instance.
But finding this number doesn't solve a problem, it adds to a body of knowledge. It fills in a bit of the puzzle. In the end the hope is that we learn something about the puzzle, or at the least, learn why we can never learn something about the puzzle.
In the case of the Mersenne prime hunt, you need the fastest integer multiplication algorithms (and concrete implementations) you can. Fast integer multiplication is a big part of several useful number-theoretic algorithms. An interesting (to me) application is, for example, to check whether a number is only divisible by small primes. This is an integral part of the most efficient integer factorization algorithms known, and one way to do it is with a product tree followed by a remainder tree [1]. This would be unacceptably slow without quasilinear-time multiplication algorithms.
The fact is that we don't know whether the search for Mersenne primes, or any other mathematical endeavour, will reveal anything useful, but given the depth of interconnection between different branches of mathematics and the usefulness of some of those branches, it doesn't seem plausible that we won't find useful things.
Although Hardy turned out to be wrong about number theory and its applications, his arguments for the intrinsic value of the study of mathematics in the absence of any real utility stand as well.
And of course, as another commenter has pointed out, making computers do things like this is a great way to develop phenomenally fast and useful algorithms.
Finally, the project found a bug in Intel CPUs[2], which is kind of neat...
[1] https://www.math.ualberta.ca/mss/misc/A%20Mathematician's%20... [2] http://www.extremetech.com/computing/220953-skylake-bug-caus...
"It is not known whether or not there is an odd perfect number, but if there is one it is big! This is probably the oldest unsolved problem in all of mathematics." [1]
How does this work? You just try to divide by every possible number and ensure the result isn't an integer?
They don't know all prime numbers up to this number, but they can easily exclude many numbers (for example even).
They use special form primes (the big primes are all n+1 or n-1 forms, with n being easy to factor).
If a Mersenne Number is prime, then the exponent must also be prime (74,207,281 is also prime). That cuts down on a lot of processing time.
Also, all factors of a Mersenne Number, if it's composite, are of the form 2nk + 1, where the Mersenne number is written 2^n - 1. That also helps factor it. I generated a huge list of prime number indices and did some tests on them a couple of years ago. 25% of the Mersenne numbers have 2*n + 1 as a factor. That's even less computation time to find a large prime.
There are simple tests and there are more complex ones, that use probabilities and other workarounds to avoid having to divide by every possible number.
[0] https://en.wikipedia.org/wiki/Lucas%E2%80%93Lehmer_primality...
Incidentally, the project source code contains one of the fastest Fourier transform implementations that I'm aware of.
It should be fairly easy to figure this out though, the benchmark code is public and if fft sizes you are interested in are known you could make a very precise comparison.
One warning about the mersenne fft code, it is not the most readable one on account of all the optimizations, but if all you're interested in is a drop-in library then it might suit your needs, especially if the size fft you're after is one that has already been optimized to the hilt by the mersenne project people. If you find you need to customize it then you're probably better off with a more universal implementation, even at the expense of some cycles.
This is nothing specific to cryptography or prime numbers. Fun fact: if you shuffle a deck of cards correctly, it's almost certain that no one in history has ever had a deck in the exact same order. https://www.math.hmc.edu/funfacts/ffiles/10002.4-6.shtml
The usual approach is to take a random odd number of desired length and then have a probabilistic primality test (much faster than what would be needed for a formal proof). Several attacks rely on bad entropy or bad pseudo random number generators (PRNG) to guess what prime was selected.
So to answer your question, if there's ever a need for ridiculously large numbers that are known to be prime this is how we'll fill it.
Short of that need, it's still fun as a mathematical world record!
...010073391086436351
Edit: Confirmed by https://www.youtube.com/watch?v=q5ozBnrd5Zc
% tail -1 M74207281/M74207281.txt
010073391086436351
% du M74207281/M74207281.txt
44504 M74207281/M74207281.txt
% md5 -q M74207281/M74207281.txt
53294de131970c2cee8da6fe9a3135b37302483892184777905493456249144515504366
7354352576469730088553216748038660370944
9872555291212307480179276559709617648630
5356033886997788467889060830923906229428
0028777084668153501142762292122183690404
5477963931367013401448014940470411696633
4745646885160717774014762912462113646879
4258014451073931002129271816293359314942
3901821387921767116495628719049868701007
3391086436351