I came across this as a good example for understanding the runtime of recursively called functions. There is a good outline of the issue here:https://stackoverflow.com/a/33663627/9750088
However, my misunderstanding comes from summing 2^1 + 2^2.... 2^n-1 as the sum of each level of the recursion tree's calls. To me, this sum of 1+2...n-1 seems to be n(n-1)/2, which intuitively seems to me like n^2 in big O notation, therefore leading to a total runtime of O 2^n^2 in big ) notation. How exactly does that sum of the tree's leaves end up 2^n instead?