I'm having trouble with induction with this specific problem.
a) Show that $\sum_{i=0}^k 2^i = 2^{k+1} - 1$ is an invariant of the loop in algorithm
begin
k := 0
while 0 ≤ k do
k := k + 1
end
b) Can you use (a) to prove that summation for every $k$ in $\mathbb{N}$? Explain.
I am unsure where to start. I could do specific examples such as when $k = 1$ and such. But how do I show the invariant. Thank you.