Project Euler #197: Investigating the behaviour of a recursively defined sequence