System.Numerics.BigInteger makes this trivial (again)
Solution for problem 15