TITLE: Evaluating $1-\frac12-\frac13+\frac14+\frac15+\frac16-\cdots$
QUESTION [17 upvotes]: What is the value of $$S=1-\frac12-\frac13+\frac14+\frac15+\frac16-\cdots$$ where the sign alternates over the triangular numbers?

To start, it is easy to prove convergence. The sum of each set of reciprocals (e.g. $\{1/2,1/3\}$ and $\{1/4,1/5,1/6\}$) can be written as $$\sum_{i=1}^n\frac1{\frac{n(n-1)}2+i},\quad n=1,2,\cdots$$ and it can be shown that it is monotonically decreasing (and tending towards zero) since \begin{align}\sum_{i=1}^n\frac1{\frac{n(n-1)}2+i}>\sum_{i=1}^{n+1}\frac1{\frac{n(n+1)}2+i}&\impliedby \sum_{i=1}^n\frac1{\frac{n(n-1)}2+i}-\sum_{i=1}^n\frac1{\frac{n(n+1)}2+i}>\frac2{n^2+3n+2}\\&\impliedby \sum_{i=1}^n\frac 1{(n^2-n+2i)(n^2+n+2i)}>\frac1{2n(n+1)(n+2)}\\&\impliedby \frac n{(n^2-n+2\cdot1)(n^2+n+2\cdot1)}>\frac1{2n(n+1)(n+2)}\\&\impliedby (n-2)(n^2+n+2)<2n^2(n+2)\\&\impliedby n^3+5n^2+4>0\end{align} Is there a closed-form expression for the value of $S$?

REPLY [2 votes]: Approximating the Sum
Applying the Euler-Maclaurin Sum Formula to $\frac1n$, we get
$$
\begin{align}
H_n
&=\log(n)+\gamma+\frac1{2n}-\frac1{12n^2}+\frac1{120n^4}-\frac1{252n^6}+\frac1{240n^8}-\frac1{132n^{10}}\\
&\phantom{\,={}}+\frac{691}{32760n^{12}}-\frac1{12n^{14}}+O\!\left(\frac1{n^{16}}\right)\tag1
\end{align}
$$
To compute $\sum\limits_{k=1}^\infty(-1)^{k-1}\!\!\left(H_{(k+1)k/2}-H_{k(k-1)/2}\right)$, we will combine the $k=2n-1$ and the $k=2n$ terms and use $(1)$ to estimate $H_n$:
$$
\begin{align}
\hspace{-5mm}f(n)
&=\overbrace{\left(H_{n(2n-1)}-H_{(2n-1)(n-1)}\right)}^{k=2n-1}-\overbrace{\left(H_{(2n+1)n}-H_{n(2n-1)}\right)}^{k=2n}\\
&=\frac1{2n^2}+\frac1{4n^3}-\frac1{8n^4}-\frac3{16n^5}-\frac{19}{96n^6}-\frac{11}{64n^7}-\frac{43}{384n^8}-\frac{41}{768n^9}\\
&\phantom{\,={}}+\frac{27}{2560n^{10}}+\frac{69}{1024n^{11}}+\frac{677}{6144n^{12}}+\frac{557}{4096n^{13}}+\frac{38797}{286720n^{14}}\\
&\phantom{\,={}}+\frac{26107}{245760n^{15}}+\frac{4597}{98304n^{16}}-\frac{2627}{65536n^{17}}-\frac{838061}{5898240n^{18}}-\frac{316167}{1310720n^{19}}\\
&\phantom{\,={}}-\frac{1130847}{3670016n^{20}}-\frac{6769583}{22020096n^{21}}-\frac{23505703}{115343360n^{22}}+\frac{616009}{20971520n^{23}}\\
&\phantom{\,={}}+\frac{29333183}{75497472n^{24}}+\frac{68957009}{83886080n^{25}}+\frac{3688165573}{3053453312n^{26}}+\frac{5672489659}{4227858432n^{27}}\\
&\phantom{\,={}}+\frac{900259265}{939524096n^{28}}-\frac{55931283}{268435456n^{29}}-\frac{18407784799}{8053063680n^{30}}\\
&\phantom{\,={}}-\frac{5422797419}{1073741824n^{31}}+O\!\left(\frac1{n^{32}}
\right)\tag2
\end{align}
$$
Next, apply the Euler-Maclaurin Sum Formula to $(2)$ to approximate
$$
\sum_{k=1}^nf(k)=C+g(n)\tag3
$$
where
$$
\begin{align}
\hspace{-5mm}g(n)
&=-\frac1{2n}+\frac1{8n^2}+\frac1{12n^3}-\frac5{64n^4}+\frac1{240n^5}+\frac{11}{384n^6}-\frac5{1344n^7}-\frac{151}{6144n^8}\\
&\phantom{\,={}}-\frac{13}{11520n^9}+\frac{507}{10240n^{10}}+\frac5{11264n^{11}}-\frac{6797}{49152n^{12}}+\frac{2411}{5591040n^{13}}\\
&\phantom{\,={}}+\frac{623927}{1146880n^{14}}-\frac{29}{737280n^{15}}-\frac{9105847}{3145728n^{16}}-\frac{1269}{5570560n^{17}}\\
&\phantom{\,={}}+\frac{470568199}{23592960n^{18}}-\frac{9641}{174325760n^{19}}-\frac{25364768763}{146800640n^{20}}+\frac{568951}{3633315840n^{21}}\\
&\phantom{\,={}}+\frac{848095747927}{461373440n^{22}}+\frac{163511}{1447034880n^{23}}-\frac{142300201072307}{6039797760n^{24}}\\
&\phantom{\,={}}-\frac{4915843}{38168166400 n^{25}}+\frac{4373467527277213}{12213813248n^{26}}-\frac{2560205}{12683575296n^{27}}\\
&\phantom{\,={}}-\frac{47857489871577677}{7516192768n^{28}}+\frac{2494825}{23353884672n^{29}}+\frac{4218610442394753611}{32212254720n^{30}}\\
&\phantom{\,={}}+O\!\left(\frac1{n^{31}}\right)\tag4
\end{align}
$$
Since $\lim\limits_{n\to\infty}g(n)=0$, $(3)$ implies $C=\sum\limits_{k=1}^\infty f(k)$.
We will use the approximation of $g$ given in $(4)$, call it $\tilde{g}$, whose error is $O\!\left(\frac1{n^{31}}\right)$, to get
$$
\sum_{k=1}^\infty f(k)=\sum_{k=1}^nf(k)-\tilde{g}(n)+O\!\left(\frac1{n^{31}}\right)\tag5
$$
Here is a table of the values from $(5)$. Note that as we double $n$, we get about $9.63$ more digits of the sum.
$$
\begin{array}{r|c|l}
n&\substack{\text{harmonic}\\\text{series}\\\text{terms}\vphantom{\text{i}}}&\sum\limits_{k=1}^nf(k)-\tilde{g}(n)\\\hline
  5&55&0.517100379042\color{#CCC}{335666895661356664256993223233139202045}\\
 10&210&0.517100379042401725064\color{#CCC}{786300619359787983738352017985}\\
 20&820&0.51710037904240172506481077213135\color{#CCC}{0714320294664965323}\\
 40&3240&0.51710037904240172506481077213135745047250\color{#CCC}{5734079916}\\
 80&12880&0.517100379042401725064810772131357450472507379080669\\
160&51360&0.517100379042401725064810772131357450472507379080669
\end{array}
$$
So with $n=80$, we need to sum $12880$ terms of the Harmonic Series to get $51$ decimal places of the sum. This is pretty good since the sum of that many terms of the series only gives about $2$ decimal places without the correction from $\tilde{g}$.

About the Error Term
Note that in $(4)$, when the exponents are big, the coefficients of the even powers of $n$ are big and the coefficients of the odd powers of $n$ are small. In fact, the coefficient of the $\frac1{n^{31}}$ term is about $\frac1{2516}$ whereas the coefficient for the $\frac1{n^{32}}$ term is about $3085116088$. This means that for $n\lt8\times10^{12}$, the error acts more like $\frac{3085116088}{n^{32}}$ than $\frac1{2516n^{31}}$.
For $n=\,\,5$, this gives about $12.9$ decimal places
For $n=10$, this gives about $22.5$ decimal places
For $n=20$, this gives about $32.1$ decimal places
For $n=40$, this gives about $41.8$ decimal places
For $n=80$, this gives about $51.4$ decimal places
These match the table above. Although, in the table, $n=10$ only matches to $21$ places, the error is actually only $2.4\times10^{-23}$.

Correction to the Proof in the Question
While it is true that the terms in the alternating sum are decreasing, as stated in the question, there is a problem with the proof there. The third line does not imply the second. Here is a fixed proof.
$$
\begin{align}
&\sum_{i=1}^n\frac1{\frac{n(n-1)}2+i}-\sum_{i=1}^{n+1}\frac1{\frac{n(n+1)}2+i}\\
&=\sum_{i=1}^n\left(\frac1{\frac{n(n-1)}2+i}-\frac1{\frac{n(n+1)}2+i}\right)-\frac1{\frac{(n+2)(n+1)}2}\tag{6a}\\
&=\sum_{i=1}^n\frac{n}{\left(\frac{n(n-1)}2+i\right)\left(\frac{n(n+1)}2+i\right)}-\frac2{(n+2)(n+1)}\tag{6b}\\
&\ge\frac{n^2}{\frac{n(n+1)}2\frac{n(n+3)}2}-\frac2{(n+2)(n+1)}\tag{6c}\\[6pt]
&=\frac4{(n+1)(n+3)}-\frac2{(n+2)(n+1)}\tag{6d}\\[9pt]
&=\frac2{(n+2)(n+3)}\tag{6e}
\end{align}
$$
Explanation:
$\text{(6a)}$: move the terms for $i\in[1,n]$ from the right sum into the left sum
$\text{(6b)}$: simplify the difference in the summation
$\text{(6c)}$: replace each term in the sum by the smallest term ($i=n$)
$\text{(6d)}$: simplify
$\text{(6e)}$: subtract