solutions to problems from http://www.projecteuler.net/