Partial fraction telescoping (source code)

= Partial fraction telescoping
{title2=$\frac{1}{(3k-2)(3k+1)}=\frac13\left(\frac{1}{3k-2}-\frac{1}{3k+1}\right)$}

Sometimes a <sum> does not initially look like a difference of neighboring entries. A <partial fraction decomposition> can reveal the cancellation. For the original example
$$
S_N=\sum_{k=1}^N\frac1{(3k-2)(3k+1)},
$$
subtract the two <reciprocals>:
$$
\frac1{3k-2}-\frac1{3k+1}
=\frac{(3k+1)-(3k-2)}{(3k-2)(3k+1)}
=\frac3{(3k-2)(3k+1)}.
$$
Thus
$$
S_N=\frac13\left(1-\frac14+\frac14-\frac17+\cdots+\frac1{3N-2}-\frac1{3N+1}\right)
=\frac13\left(1-\frac1{3N+1}\right)
=\frac{N}{3N+1}.
$$
For $N=3$, direct <addition> gives $1/4+1/28+1/70=3/10$. For $N=6$, the six positive entries add to $6/19\approx0.315789$. The <partial sums> approach $1/3$, and the exact <series remainder> is
$$
\boxed{\frac13-S_N=\frac1{3(3N+1)}.}
$$
This formula answers an accuracy question as well as a summation question. To make the remaining positive <series remainder> smaller than $0.001$, solve $1/[3(3N+1)]<1/1000$. The result is $9N+3>1000$, so \b[the smallest permitted <integer> is $N=111$]. At $N=110$, the error is $1/993>0.001$; at $N=111$, it is $1/1002<0.001$.