Fifteen calls for six levels.
transcript
Count the calls for five levels. A plain recursion makes fifteen. But only six different levels exist. Most calls are repeats.
Draw the calls as a tree. Level three appears twice. Level two appears three times. That is fifteen calls in all. Six different levels, fifteen calls.
Equal arguments give an equal answer. So the second copy repeats work. The third copy repeats it again.
Thirty levels make 2,692,537 calls. Only thirty-one levels exist. The counter measured it.
Store each answer the first time. Look it up the next time. Thirty levels then need 59 calls.
Level five is called once. Level three is called twice. Level two is called three times. Level one is called five times.
Draw the calls first. Look for equal arguments in different branches. If they repeat, add a cache. Then each problem is solved once.
Solve each problem once. Reuse the answer after that. Full breakdown in the lecture.