Notebook for Project Euler problem 14