Sum of the first n terms of an arithmetic sequence

Given
[tex]\begin{gathered} a)\text{ }-1+3+7+...+551 \\ b)\text{ }\sum_{i\mathop{=}1}^{79}(2i+6) \end{gathered}[/tex]To find the sum of the arithmetic sequence.
Explanation:
It is given that,
[tex]\begin{gathered} a)\text{ }-1+3+7+...+551 \\ b)\text{ }\sum_{i\mathop{=}1}^{79}(2i+6) \end{gathered}[/tex]That implies,
a) Here, the first term, the last t and common difference is,
[tex]\begin{gathered} a=-1,d=3-(-1)=3+1=4,l=551 \\ \Rightarrow a=-1,d=4,l=551 \end{gathered}[/tex]And,
[tex]\begin{gathered} n=\frac{l-a}{d}+1 \\ =\frac{551-(-1)}{4}+1 \\ =\frac{552}{4}+1 \\ =138+1 \\ =139 \end{gathered}[/tex]Then, the sum is given by,
[tex]\begin{gathered} S_n=\frac{n}{2}(a+l) \\ =\frac{139}{2}(-1+551) \\ =\frac{139}{2}\times550 \\ =139\times275 \\ =38225 \end{gathered}[/tex]Hence, the sum is 38225.
Also,
b) It is given that,
[tex]\sum_{i=1}^{79}(2i+6)=8,10,12,...,164[/tex]Here, the first term, common difference and the last term are,
[tex]\begin{gathered} a=8,d=10-8=2,l=164 \\ a=8,d=2,l=164 \end{gathered}[/tex]And,
[tex]n=79[/tex]Then, the sum is given by,
[tex]\begin{gathered} S_n=\frac{n}{2}(a+l) \\ S_{79}=\frac{79}{2}(8+164) \\ =\frac{79}{2}\times172 \\ =79\times86 \\ =6794 \end{gathered}[/tex]Hence, the sum is 6794.