Problems from projecteuler.net, done in Swift