You are an expert,
if you made enough errors
in a very narrow field.
Nils Bohr.
E593 On the transformation of series into continued fractions, where at once this not mediocre theory is enlarged. Written 1775. Published 1785. https://scholarlycommons.pacific.edu/euler-works/593/
The goal is to find a generalized continued fraction for
-Ei(-1)=+
δ

=
∞
∑
k=1
1+k
(-1)
kk!
.δ Euler-Gompertz constant Euler’s number (discovered by Jacob Bernoulli) Euler-Gamma constantThe Euler-Gompertz constant is
δ=-Ei(-1)=0.596347...
https://en.wikipedia.org/wiki/Gompertz_constant

Some historical background

https://en.wikipedia.org/wiki/Jacob_Bernoulli​
In 1683, Bernoulli discovered the constant

by studying a question about compound interest which required him to find the following limit. He also discovered the Bernoulli numbers.
Out[]=
lim
n∞
n
1+
1
n

https://en.wikipedia.org/wiki/E_(mathematical_constant)​
Euler proved that  is the sum of the infinite series
Out[]=
∞
∑
k=0
1
k!

Euler found the regularized value of this divergent series in E247 De seriebus divergentibus, written 1746, published 1760. And calls it Wallis hypergeometric series
1-1+2-6+24-120+720-5040±etc.
​He finds the same value with many different methods to be​
​​https://scholarlycommons.pacific.edu/euler-works/247/​And today it is known as Euler-Gompertz constant.
Out[]//TraditionalForm=
∞
∑
k=0
k
(-1)
k!-Ei(-1)δ0.59634736
Euler proved in §11 of E43 Observations on harmonic Progressions:
​https://en.wikipedia.org/wiki/Euler%27s_constant
Out[]//TraditionalForm=
lim
n∞
n
∑
k=1
1
k
-log(n)
In E593 §40 Euler states theorem VI:
Theorema VI.§ 40. Si proposita fuerit huiusmodi series infinita (1)
s=
1
α
-
1
αβ
+
1
αβγ
-
1
αβγδ
+etc.
​exinde formari poterit haec fractio continua: (2)
1
s
=α+
α
β-1+
β
γ-1+
γ
δ-1+etc.
(1) can can be written in Mathematica:
Out[]=
s
1
α
-
1
αβ
+
1
αβγ
-
1
αβγδ
+ etc.
(2) can we written in Mathematica:
Out[]=
1
s
α+
α
-1+β+
β
-1+γ+
γ
-1+δ+etc.
In §41 Euler derived a continued fraction for
-1

=
∞
∑
k=1
k+1
(-1)
k!
using theorem VI, and setting
α->1,β->2,etc.
Then (1) is:
Out[]=
s
∞
∑
k=1
1+k
(-1)
k!

1
1
-
1
12
+
1
123
-
1
1234
±…
-1

0.632120558828558…
and (2) turns the series into the following continued expression:
Out[]=
1
s


-1
1+
1
-1+2+
2
-1+3+
3
-1+4+
4
-1+5+
5
...
Simplifying the denominators:
Out[]=
(3)
1
s


-1
1+
1
1+
2
2+
3
3+
4
4+
5
...
Subtracting 1 on both sides of (3) is even more beautiful:
Out[]=
(4)
1
s
-1
1
-1

1
1+
2
2+
3
3+
4
4+
5
...
Euler transforms (4) with the following theorem
Theorem (Euler E593 §42)If
s=
a
a+
b
b+
c
c+
d
d+...
then
s
1-s
=a+
a
b+
b
c+
c
d+
d
...
Out[]//TraditionalForm=
s
1
-1
,
s
1-s

1
-2
... into:
Out[]=
(5)
1
-2
1+
1
2+
2
3+
3
4+
4
5+
5
...

Going beyond Euler

I’m starting with this expression:
Out[]=
s
∞
∑
k=1
1+k
(-1)
kk!
1-
1
2
2
+
1
2
2
3
-
1
23
2
4
∓ ...-Ei(-1)0.796599599297053...
I’m using theorem VI to derive the continued fraction for this series (3)
1
2
β
-
1
β
2
γ
+
1
βγ
2
δ
∓etc.
​by replacing
β->α,γ->β/α,δ->γ/β,...
and then
α->1
in (1) and (2)and then replacing
β->2,γ->3,etc.
to compute
∞
∑
k=1
1+k
(-1)
kk!
This converts (1) in (3):
Out[]=
1
2
β
-
1
β
2
γ
+
1
βγ
2
δ
-
1
βγδ
2
ε
+
1
βγδε
2
ζ
Doing the same on (2):
Out[]=
2
β
+
2
β
-1+
2
γ
β
+
2
γ
β-1+
2
δ
γ
+
2
δ
γ-1+
2
ε
δ
+
2
ε
δ-1+
2
ζ
ε
Now we replace the Greek letters
β->2,γ->3
etc.
Out[]=
2
2
+
2
2
-1+
2
3
2
+
2
3
2-1+
2
4
3
+
2
4
3-1+
2
5
4
+
2
5
4-1+
2
6
5
Expanding the fractions:
Out[]=
2
2
+
2
2
-1+
1
2
3
2
+
2
3
-2+
2
2
4
3
+
2
2
4
-3+
3
2
5
4
+
3
2
5
-4+
4
2
6
5
The value of the continued fraction is:
Out[]=
4.91641116017483
And this is the same (by no surprise):
In[]:=
N
1
1-EulerGamma+ExpIntegralEi[-1]
,15
Out[]=
4.91641116017483
Now
-Ei(-1)=+
δ

has the value:
In[]:=
N[EulerGamma-ExpIntegralEi[-1],15]
And this continued fraction has the same value:
Numerical evidence for the continued fraction for the first 21 fractions:
So finally the answer is (the continued fraction continues of course ... :)

Appendix

How is this series transformed into a generalized continued fraction?
With a similar derivation as above this shows up (the continued fraction continues of course ... :)
Numerical evidence:
And the continued fraction with 20+ terms:

Wolfram Language Code

CITE THIS NOTEBOOK

Euler E593 transformation of series into continued fractions​
by Oliver Seipel​
Wolfram Community, STAFF PICKS, April 1, 2024
​https://community.wolfram.com/groups/-/m/t/3150592