For loop Time Estimation

It was given that for j = 2 to n why does it equal to ‘n’ and not ‘n-1’ in algorithms ?
Here ‘n’ i have have put them in apostrophe because to explain that ‘n’ is the no of times which each have cost c1?


Time= 20:39

The presenter seems unsure and mentions at 21:10 that it may be a mistake and that ‘n’ vs ‘n-1’ is not a relevant difference.

However, I do think it is ‘n’ times because the cycle only finishes when j = n+1. It’s easier to ‘see’ it if you translate it as a C/C++/Java construct:

for (j = 2; j <= n; j++)

Is executed for j = 2, 3, 4, …, n, n+1. So the number of times is n+1 - 2 + 1 = n.