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)
 A: 
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.

A: This is $$3\sum_{i=2}^n i-2\sum_{i=2}^n 1=$$
A: Yes, it's correct: maybe you wouldn't have done so many calculations, if you changed from $\sum\limits_{i=0}^{n}f(i)$ to $\left(\sum\limits_{i=0}^n f(i)\right) - f(0)-f(1)$. Then calculate $f_{0}$ and $f{1}$ and substatract them in the final formula.
A: 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}.$$
