Solution (source code)

= Solution

For $r\ne1$, differentiate the <finite geometric series> and multiply by $r$:
$$
\sum_{n=1}^Nnr^n
=r\frac d{dr}\left(\frac{1-r^{N+1}}{1-r}\right)
=\frac{r[1-(N+1)r^N+Nr^{N+1}]}{(1-r)^2}.
$$
The required terms are $-nr^n$ with $r=-1/3$. The <finite weighted geometric sum> therefore gives
$$
\boxed{S_N=\frac3{16}\left[1-\left(1+\frac{4N}{3}\right)
\left(-\frac13\right)^N\right].}
$$
Since $N/3^N\to0$, the correction tends to zero, proving convergence and yielding
$$
\boxed{\sum_{n=1}^{\infty}\frac{(-1)^{n+1}n}{3^n}=\frac3{16}.}
$$
In fact the <ratio test> also proves <absolute convergence>, since the ratio of consecutive absolute terms tends to $1/3$.