Problems 5 & 6 for project Euler