Numerically efficient summation of shrinking series $\sum_1^n 2/(2k - 1)$ Let
$$G_{2n} := G_{2n+1} := -\gamma -\log 2 + \sum_{k=1}^n \frac{2}{2k-1}$$
where $\gamma$ is Euler's constant. (We also have $G_1 := -\gamma - \log 2$.)
Thus we have
$$G_{2n+2} = G_{2n} + \frac{2}{2n+1} \tag{*}\label{*}$$
for $n \geq 1$.
My program needs to evaluate $G_n$ for many different $n \leq n_{max}$. (In a first experiment, $n_{max} \approx 30\,000$.) Because of the simple structure of the sum - summing monotonically decreasing summands - there should be a numerically efficient (and stable) way of calculating the $G_n$ to double presicion. Do you know how?
I might also cache the values in an array of size $n_{max}$, the maximum $n$ of which I may need the $G_n$. Then I can calculate all values in a loop, only requiring a single summation for each new $G_n$, thanks to equation \eqref{*}.
 A: How large is the maximum $n$ you would need to calculate? You could do a prime sieve, calculating the gcd of all numbers you will use up to $n_{max}$ and then put on common denominator and add double precision cast numbers up. This way you would avoid cancellation effects you would otherwise have gotten by summing results of divisions. But I am not sure if it would be necessary for this particular problem. It probably depends a lot on approximately how large this $n_{max}$ would be.
If largest $n$ needed is really large then: $\frac{2}{2k-1} + \frac{2}{2k+1}$ could be different from $\frac{2(2k+1) + 2(2k-1)}{(2k+1)(2k-1)}$. Although I do not know for how large $k$ that would be noticeable. Still haven't found a practical difference so maybe this won't affect this particular series.

SPEED
Another aspect that the above approach could be helpful for is clumping together terms could affect is speed. Floating point divisions usually take considerably longer than multiplications on modern CPUs. Also someone claims it could clog up pipelines - which can be even worse for performance. So splitting the sum into sub-sums of some suitable size, multiplying and summing stuff together in numerator and denominator separately and then performing division could give performance boosts.
Also of course to be able to use modern multi-core architectures or even GPUs some "clumping together" of calculations would be necessary to split computations into equal time-units which could be run in parallell on the different cores.

Speed Comparison With Rational Expressions
In the C language calculating polynomials in numerator and denominator by "clumping together" terms:
For 30 000 terms one thread: 
$$\begin{array}{|r|r|r|}\hline \mathrm{terms} & \mathrm{time} & \mathrm{speedup}\\\hline
1&230\,\,[\mu s]&1\\
2&119\,\,[\mu s]&1.96\\
4&60\,\,[\mu s]&3.50\\
16&30\,\,[\mu s]&7.77\\\hline\end{array}$$
So our strategy selling divisions and buying time to do multiplies and adders seems to work. ( But one will need to tweak compiler optimization settings and factor the expressions in reasonable ways, probably a computer algebra toolset or Matlab, octave, Mathematica, Maple can help systematically generate candidate polynomial factorizations if we want to really squeeze for performance. )
A: Since $$\sum_{k=1}^n\frac{2}{2k-1}=2\sum_{k=1}^n\frac{1}{2k-1}=2\left(\sum_{k=1}^{2n-1}\frac{1}{k}-\sum_{k=1}^{n-1}\frac{1}{2k}\right)=2H_{2n-1}-H_{n-1}$$ where $H_k$ is the $k$th harmonic number, you can research efficient ways to compute harmonic numbers. There are probably well-studied approaches for that.
A: You may want to use repeatedly the Shanks transformation. It will accelerate enormously the convergence speed of your series, even a few 16 terms will already amount to thousands of terms without the transformation.
