Project Euler 872 - Recursive Tree

Official link: https://projecteuler.net/problem=872