If you were to take the following for-loop:
for (int i = 1; i <= 50; i++) {}
And write it in mathematical form, it would look something like this:
$\sum\limits_{i=1}^{50}i$
Each interval of the above sequence would be the same as each interval i
of the above for-loop
the $50$ is the maximum number, the "$i=0$" is the starting point, but what about the iterations. all of them seem to have to do with $i$ being the current index of the sequence.
How would I write something that has iterations that are greater than one?
Meaning:
Is there a way of writing this:
for (int i = 1; i <= 50; i += 3) {}
in summation form?