Is there simpler method to find $\sum_{k=1}^n(3k-2)^3$? I have $\large\sum_{k=1}^n(3k-2)^3$. to evaluate it the normal approach is:
$$\sum_{k=1}^n(3k-2)^3=27\sum_{k=1}^nk^3-54\sum_{k=1}^nk^2+36\sum_{k=1}^nk-\sum_{k=1}^n8$$
And using the known formulas to evaluate $\sum_{k=1}^nk^3 , \sum_{k=1}^nk^2, \sum_{k=1}^nk$.
But I wonder is there other approach (preferably easier) to find this sums? I am thinking about writing $(3k-2)^3$ as $a_{k+1}-a_{k}$ then using telescoping series, but not sure how to do that.
 A: Hint Since $(n+1)^k-n^k$ is a polynomial in $n$ of degree $k-1$, you should expect that $a_k$ can be chosen to be polynomial of degree $3+1$.
So look for $a_k=ak^4+bk^3+ck^2+dk+e$.
Then,
$$
a_{k+1}-a_k=(3k-2)^3
$$
becomes a system of $4$ equations with 4 unknowns (the $e$'s cancel), which has unique solution. Solve it and you are done.
Note here that you can assume WLOG that $e=0$ from the beginning, since if $a_k$ is a solution then so is $a_k-e$.
A: Maybe not the most simple approach but elementary and generalising the original problem.
Defining the generating function
$$g(t)=\sum_{k=1}^{n} e^{t (k-2)}\tag{1}$$
we can obtain sums of the type
$$s(p) = \sum_{k=1}^{n} (k-2)^p\tag{2}$$
by the p-fold derivative with respect to $t$ as
$$s(p) = \frac{1}{p!}\left(\frac{d}{dt}\right)^p g(t) |_{t\to 0}\tag{3}$$
Now we can calculate the finite geometric sum over $k$ in $g$ to get
$$g(t)= \frac{e^{2 t}-e^{(2-3 n) t}}{e^{3 t}-1}\tag{4}$$
The Taylor expansion of $g$ at $t=0$ starts linke this
$$\begin{align}
g(t)\simeq 
& n + \frac{1}{2} \left(n-3 n^2\right) t+\frac{1}{4} \left(6 n^3-3 n^2-n\right) t^2\\
& +\frac{1}{24} \left(-27 n^4+18 n^3+9 n^2-4 n\right) t^3\\
& +\frac{1}{240} \left(162 n^5-135 n^4-90 n^3+60 n^2+13 n\right) t^4\\
& +\frac{1}{480} \left(-162 n^6+162 n^5+135 n^4-120 n^3-39 n^2+20 n\right) t^5+O(t^6)\end{align}\tag{5}$$
Now we can easily find the first few sums $s(p)$ from $(5)$.
