Simple sum with $i = 2$ step I need to calculate the following sum:
$$S_{n} = \sum_{2 \leq i \leq n  } (3i - 2)$$
(two more conditions for the above sum: $n$ is even and $i$ with step $2$ (not sure how to do multi-line))
Adding image of the task with multi-line visible:

I wrote down the first few terms and it looks like this:
$4, 10, 16, 22, ...$
I re-arranged a bit and obtained such sum:
$$S_{n} = \sum_{i = 0}^{n} 4+6i$$
and its terms are the same: $4, 10, 16, 22, ...$
Is the top boundary correct?
Proceeding with the solution:
$$S_{n} = \sum_{i = 0}^{n} 4+6i$$
$$S_{n} = 4 \sum_{i = 0}^{n} + 6 \sum_{i = 0}^{n} i$$
$$S_{n} = 4n + 4 + 6 \sum_{i = 0}^{n} i$$
$$S_{n} = 4n + 4 + 6 \frac{(1+n)n}{2}$$
$$S_{n} = 4n + 4 + 3 (n^2 + n)$$
$$S_{n} = 3n^2 + 7n + 4$$
Testing for $n = 3$:
$$S_{3} = 3(3^2) + 21 + 4 = 52 = \Bigg(4 + 10 + 16 + 22 \Bigg)$$
So the result seems correct. But is it for sure? Plugging $3$ into $n$ should take into account only first $3$ or first $4$ elements? (works fine for first $4$ elements, but seems kinda wrong for me)

Make the substitution $j=i-2$: $$S_n=\sum_{i=2}^{n}(3i-2) = \sum_{j=0}^{n-2}[3(j+2)-2] = \sum_{j=0}^{n-2}(3j+4) = 3 \cdot \sum_{j=0}^{n-2} j + 4 \cdot \sum_{j=0}^{n-2} 1 .$$ Now use the well known formula $\sum_{j=0}^{m} j = \frac{m(m+1)}{2}$ and get 
$$ S_n = 3 \cdot \frac{(n-2)(n-1)}{2} + 4 \cdot (n-1) = \frac{3n^2-9n+6+8n-8}{2} = \frac{3n^2-n-2}{2} = \frac{(3n+2)(n-1)}{2}.$$
