# Calculate 40 digits of the MRB constant

MRB constant is the upper limit point of the following sequence

$$s_n=\sum_{k=1}^{n} (-1)^k k^{\frac{1}{k}}$$

$MRB=\color{blue}{0.1878596}...$

I tried to calculate first few digits:

Sum[(-1)^k k^(1/k), {k, 1, 3 000 000}] // N // AbsoluteTiming


$\lbrace{83.152 , \color{blue}{0.1878}} \color{red}{62} \rbrace$

I also tried NSum but ... there is a different result

NSum[(-1)^k k^(1/k), {k, 1, Infinity}]


$\color{red}{-0.31214}$

Block[{\$MaxExtraPrecision = 1000},
NSum[(-1)^k k^(1/k), {k, 1, Infinity}, WorkingPrecision -> 40]]


How can I calculate 40 digits of the MRB constant?

## 1 Answer

First of all take a look at the thread mentioned in the comments for a sequence with faster convergence.

Using one of the more obvious series (also mentioned in the MathWorld article you linked), the following code produces the MRB constant with 40 digits of accuracy:

NSum[(-1)^k (k^(1/k) - 1), {k, 1, ∞},
WorkingPrecision -> 100,
NSumTerms -> 10000
]

• You might want to try the setting Method -> "AlternatingSigns", so you don't need a large setting of NSumTerms. – J. M. is in limbo Oct 25 '17 at 8:50