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)


We consider the original task 
  \begin{align*}
  S_N=\sum_{{2\leq i\leq N}\atop{i\ \mathrm{with\  step\ } 2}}\left(3i-2\right)\qquad\qquad N\mathrm{\  even}
  \end{align*}

We calculate for small $N=2,4,6$ (considering even $N$ only)
\begin{align*}
  S_2&=\sum_{{2\leq i\leq 2}\atop{i\ \mathrm{with\ step\ } 2}}(3i-2)=3\cdot 2-2=4\\
  S_4&=\sum_{{2\leq i\leq 4}\atop{i\ \mathrm{with\ step\ } 2}}(3i-2)=(3\cdot 2-2)+(3\cdot 4-2)=4+10=14\\
  S_6&=\sum_{{2\leq i\leq 6}\atop{i\ \mathrm{with\ step\ } 2}}(3i-2)=(3\cdot 2-2)+(3\cdot 4-2)+(3\cdot 6-2)=4+10+16=30\\  
  \end{align*}

Generally we obtain for even $N$:
  \begin{align*}
\color{blue}{S_N}&=\sum_{{2\leq i\leq N}\atop{{i\ \mathrm{with\ step\ }2}}}\left(3i-2\right)\\
&=\sum_{{i=2}\atop {i\ \mathrm{with\ step\ }2}}^N\left(3i-2\right)\\
&=\sum_{i=1}^{N/2}\left(3(2i)-2\right)\tag{1}\\
&=6\sum_{i=1}^{N/2}i-2\sum_{i=1}^{N/2}1\\
&=6\cdot\frac{1}{2}\cdot\frac{N}{2}\left(\frac{N}{2}+1\right)-2\cdot\frac{N}{2}\tag{2}\\
&\,\,\color{blue}{=\frac{3}{4}N^2+\frac{1}{2}N}
\end{align*}
  which gives for small values of $N$: $S_2=4,S_4=14,S_6=30$ as expected.

Comment:


*

*In (1) we respect the step-width $2$ of $i$ by substituting $i$ with $2i$. We also have to set the lower limit to $1$ and the upper limit to $N/2$ as compensation.

*In (2) we use the finite geometric sum formula $\sum_{i=1}^ni=\frac{1}{2}n(n+1)$.

Hint: Your sum $S_n$ is not correct, since there are brackets missing and an index shift was not appropriately performed. But it can be easily corrected. We have with $n=\frac{N}{2}$
\begin{align*}
\sum_{{i=2}\atop{\mathrm{step\ width}\ 2}}^{N}(3i-2)&=\sum_{i=1}^{N/2}\color{blue}{(}3(2i)-2\color{blue}{)}\\
&=\sum_{i=1}^n\color{blue}{(}6i-2\color{blue}{)}\\
&=\sum_{i=0}^{\color{blue}{n-1}}\color{blue}{(}6i+4\color{blue}{)}\\
&=\ldots
\end{align*}
which gives for $n=1,2,3,\ldots$ the sequence $4,14,30,\ldots$ as it should be.

