MathCastle
Counting & ProbabilityChallengeRecursion, Catalan Numbers & Generating Functions

Recursion, Catalan Numbers & Generating Functions · Challenge problem

A program computes Fibonacci numbers with the function: fib(n)\mathrm{fib}(n) returns 11 if n≤2n\le2, and otherwise returns fib(n−1)+fib(n−2)\mathrm{fib}(n-1)+\mathrm{fib}(n-2), computing both calls from scratch. How many calls of fib\mathrm{fib}, including the first call, are made when computing fib(20)\mathrm{fib}(20)?