Project Euler problem 48