Project Euler #167: Investigating Ulam sequences