Working through the Project Euler problems, here are the ways I found the answers.