I was looking at the wikipedia page on primes and of course, I came across the largest known prime which is 2^43,112,609 − 1
. This number is exceptionally large. So for fun, I decided to put this into BigInteger
. To calculate this, it would take a very long time (I gave up after a while).
Is there any faster of computing a very large number like this? Or is BigInteger
and a better computer the only way? Any reduction of time would be great.
*Note that my question has nothing to do with finding prime numbers. I'm asking if there is a better way to compute the number 2^43,112,609 − 1
.