A 10,000 digit prime number called the "Pepe" prime
(media.greatawakening.win)
You're viewing a single comment thread. View all comments, or full comment thread.
Comments (22)
sorted by:
Care to share your code?
There is actually a LONG post where a poster did exactly that. I believe it was posted 12/27
The code is in the comments
The code is trivial. The main issue potentially is in sympy. I use the function "isprime()" to determine if a number is a prime. It is highly optimized and uses all the tricks as it is a module that is developed and maintained by people who work in number theory (I do not).
From the documentation of sympy:
"Test if n is a prime number (True) or not (False). For n < 2^64 the answer is definitive; larger n values have a small probability of actually being pseudoprimes.
Negative numbers (e.g. -2) are not considered prime.
The first step is looking for trivial factors, which if found enables a quick return. Next, if the sieve is large enough, use bisection search on the sieve. For small numbers, a set of deterministic Miller-Rabin tests are performed with bases that are known to have no counterexamples in their range. Finally if the number is larger than 2^64, a strong BPSW test is performed. While this is a probable prime test and we believe counterexamples exist, there are no known counterexamples."
I am not sure how the BPSW test works and to be honest, I am not really interested in digging into number theory for a few weeks, just for this small "project" (if I can call it that at all).
Whatever the case, I am not going to pretend I could write a better test for a number to determine if it is prime than people who work with this stuff every day.
There's also the question of how to prove a number is prime and not a pseudo-prime number. How would one present such a proof? Do I just output all prime numbers up until the square root of the number I am displaying as an image? Because that would be the official test. Any number is a prime number until it is proven it can be factorized by any of the primes up the the prime number right before the square root of the original number.
Okay, suppose I do that. I store one bit for every number up to the square root of my number to indicate it is a prime number or not. That would take 10^900 bits for a single 1800 digit prime number. 10^900 bits is a bit more than 10^899 bytes. If I turn this into kilobytes, I take another 3 orders of magnitude off (1000 vs 1024). So turning it into terabytes, I can take off 3+3+3+3 = 12 orders of magnitude.
I am not sure I have 10^877 TB of storage. I am not sure I could compress this data to send it over the internet and I am not sure you could store it locally and then I am pretty sure you could never look through all this data before the universe ends xD