<s>[INST] Prove that $1 + 4 + 7 + · · · + 3n − 2 = \frac {n(3n − 1)}{2}$ Prove that
$$1 + 4 + 7 + · · · + 3n − 2 =
\frac{n(3n − 1)}
2$$
for all positive integers $n$.

Proof: $$1+4+7+\ldots +3(k+1)-2= \frac{(k + 1)[3(k+1)+1]}2$$
  $$\frac{(k + 1)[3(k+1)+1]}2 + 3(k+1)-2$$

Along my proof I am stuck at the above section where it would be shown that:

$\dfrac{(k + 1)[3(k+1)+1]}2 + 3(k+1)-2$   is equivalent to $\dfrac{(k + 1)[3(k+1)+1]}2$
Any assistance would be appreciated.
 [/INST] Put:
$$f(x) = \sum_{k=0}^{n-1}\exp\left[(3 k +1)x\right]=\exp(x)\frac{\exp(3 n x)-1}{\exp(3 x)-1}$$
If we expand $f(x)$ in a series expansion around $x=0$, then the coefficient of $x$ will give us the desired summation. We can do this as follows, we put:
$$g(x) = \log\left[f(x)\right] = x + \log\left[\exp(3 n x)-1\right]-\log\left[\exp(3x)-1\right]$$
Series expansion around $x = 0$ to order $x$ yields:
$$g(x) = x + \log\left(3 n x + \frac{9 n^2x^2}{2}+\cdots\right) -\log\left(3 x + \frac{9 x^2}{2}+\cdots\right)$$
$$=x + \log(n) + \log\left(1+\frac{3nx}{2}+\cdots\right)- \log\left(1+\frac{3x}{2}+\cdots\right)$$
$$=\log(n) + \frac{3 n -1}{2} x+\cdots$$
Therefore:
$$f(x) = \exp\left[g(x)\right] = n\exp\left(\frac{3 n -1}{2} x+\cdots\right)=n + \frac{n(3 n -1)}{2} x+\cdots$$
</s>