I started learning the Ackermann Function in my CS class and we started off with $$f(5,1)=2$$ or $$f(5,2)=f(4,f(5,1))=f(4,2)=f(3,f(4,1))=f(3,2)=f(2,f(3,1))=f(2,2)=f(1,f(2,1))=f(1,2)=4$$Then we had to do ones that involve variables, such as $f(2,n)$. Here's what I did:
$$f(2,n)=f(1,f(2,n-1))=f(1,f(2,f(2,n-2)))=f(1,f(2,f(2,f(1,n-3))))=f(1,f(2,f(2,f(1,f(2,n-4))))$$ I can sort of see the pattern but I have no idea how the answer is actually $2n$ because maybe I don't fully understand the concept of the Ackermann Function or it's too late in the night but I've been stuck on this part for quite a while. A detailed answer would be absolutely incredible since I'm only a freshmen in CS.
First, from $f(1, n) = f(0, f(1, n-1)) = 1 + f(1, n-1)$ conclude that $f(1,n) = n + 2$
Then, use the above conclusion to see that $f(2,n) = f(1, f(2,n-1)) = f(2, n-1) +2$.
Can you continue?