mx @kitten, true! we can prove this by induction on the depth.
for depth = 0, there is exactly one node, and 2^(0+1)-1 = 1. so the formula works in the base case.
now suppose we know it is true for all trees up to a given depth d. a tree with depth d+1 looks lik two trees of depth d connected by an additional node. so the number of nodes is two times the number of nodes in a tree of depth d, plus one. 2*(2^(d+1)-1) + 1 = 2*(2^(d+1)) - 2 - 1 = 2^((d+1)+1) - 1, showing that the formula holds for depth d+1 if it holds for depth d.
by induction, we conclude the formula is true for all depths ≥ 0.