Problem

Source: IMO 1981, Day 2, Problem 6

Tags: function, algebra, functional equation, IMO, IMO 1981



The function $f(x,y)$ satisfies: $f(0,y)=y+1, f(x+1,0) = f(x,1), f(x+1,y+1)=f(x,f(x+1,y))$ for all non-negative integers $x,y$. Find $f(4,1981)$.