Project Euler #235: An Arithmetic Geometric sequence