WolframAlpha computational knowledge AI
2^n-1 + 3 * 2^(n-3) -1 + sum_(j=3)^(n-1)((j^2 + j (j + 1)/2 - 1) 2^(n - j - 1) - j) - (n-1)