Each new term is the sum of the squares of the preceding two terms: 2 = 1² + 1², 5 = 2² + 1², and 29 = 5² + 2². Therefore, the next term is 29² + 5² = 841 + 25 = 866.