Ask HN: How can I check if a large number is prime?
I was looking at a list of prime numbers in binary format and I noticed a pattern, where if 2^n - 1, a Mersenne Prime, is in the list, then (2^(n+1) - 2^(n) - 1) is also in the list.
I looked at the list of Mersenne Primes on Wikipedia and checked the primality of (2^43112610 - 2^43112609 - 1) on Wolfram Alpha, but to test for any results larger than that, the results are inconclusive.
The largest discovered prime number is a Mersenne Prime (2^82589933 − 1), so I'm wondering how I can go about testing (2^82589934 - 2^82589933 − 1).
4 comments
[ 4.3 ms ] story [ 23.2 ms ] threadThat’s because both are equal. We have
so