Project Euler #24: Lexicographic permutations