If you use elementary algorithms, your BigInts will not be suitable for very large integers, such as Mersenne Primes.
If this suits you, use a simple 32-bit int as the base data type. In this case, you need to process 64 results. If you don't care about speed at all, use some radix-10 base as the base, say 10000, which will be very easy to implement.
This is mainly because multiplication in a naive implementation has O (n ^ 2) runtimes. Advanced algorithms based on Fourier transforms have O (n (log (n)) runtimes, which requires some mathematical skills and knowledge.
source share