4. Given $1+2 \times 3+3 \times 3^{2}+\cdots+n \times 3^{n-1}$ $=3^{n}(n a-b)+c$, for all $n \in \mathbf{N}_{+}$. Then, the values of $a, b, c$ are (.
(A) $a=0, b=c=\frac{1}{4}$
(B) $a=b=c=\frac{1}{4}$
(C) $a=\frac{1}{2}, b=c=\frac{1}{4}$
(D) There do not exist such $a, b, c$
4.C.

It is known that $S_{n}=3 S_{n-1}+\frac{3^{n}-1}{2}$.
Also, $S_{n}=S_{n-1}+n \cdot 3^{n-1}$, so $S_{n}=3^{n}\left(\frac{n}{2}-\frac{1}{4}\right)+\frac{1}{4}$.