A solution to problem twelve found on projecteuler.net/problems