Project euler problems 6, 7, 8