Project Euler mathematical/computer programming challenge