Yes, it's nearly correct.
A small correction: in the i
th step, the number of operations is not log i
, as most of the time that's an irrational number, it's O(log i)
. So for a mathematically tight proof you have to work a bit harder, but in short, what you wrote is the essence of the proof.