I am almost embarrassed to make a post about problem 97 of Project Euler which reads
However, in 2004 there was found a massive non-Mersenne prime which contains 2,357,207 digits: 2843327830457+1.
Find the last ten digits of this prime number.
I decided to use the BigInteger class for solving this, so I didn’t have to care about numerical issues. The only other insight that was needed was to use the ModPow method which takes the modulo along with the power instead of doing those seperatly.











Leave a Comment
Project Euler