Problem

Source: 2014 Belarus TST 5.2

Tags: Sequence, recurrence relation, algebra, number theory with sequences



Find all sequences $(a_n)$ of positive integers satisfying the equality $a_n=a_{a_{n-1}}+a_{a_{n+1}}$ a) for all $n\ge 2$ b) for all $n \ge 3$ (I. Gorodnin)