Here is the trick: . Instead of multiplications, compute once and square it. More generally: if is even, . If is odd, . This cuts the problem size in half each time (when is even).
Instead of calls, you make calls. For , that is about calls instead of . Huge difference. This improvement reduces redundant work largely.