OFFSET
1,4
COMMENTS
The continued fraction only produces values for the principal branch of the product logarithm.
LINKS
Cristina B. Corcino, Roberto B. Corcino, and István Mező, Continued fraction expansions for the Lambert W function, Aequat. Math. 93, 485-498 (2019)
EXAMPLE
LambertW(x) = x/(1 + x/(1 + x/(2 + 5*x/(3 + 17*x/(10 + 133*x/(17 + 1927*x/(190 + ... ))))))).
MATHEMATICA
ClearAll[cf, x];
cf[ O[x]] = {};
cf[ a0_ + O[x]] := {a0};
cf[ ps_] := Module[ {a0, a1, u, v},
a0 = SeriesCoefficient[ ps, {x, 0, 0}];
a1 = SeriesCoefficient[ ps, {x, 0, 1}];
u = Numerator[a1]; v = Denominator[a1];
Join[ If[ a0==0, {}, {a0}],
Prepend[cf[ u*x/(ps-a0) - v], {u, v}]]];
(* Lambert W function W_0(x) up to O(x)^(M+1) *)
M = 10; W0 = Sum[ x^n*(-n)^(n-1)/n!, {n, 1, M}] + x*O[x]^M;
cf[W0] //InputForm
(* {{1, 1}, {1, 1}, {1, 2}, {5, 3}, {17, 10}, {133, 17},
{1927, 190}, {13582711, 94423}, {92612482895, 1597966},
{10402118970990527, 8773814169}} *)
(* Note: Change M to the number of terms to be generated *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jacob DeMoss, Jun 17 2025
EXTENSIONS
More terms from Alois P. Heinz, Jun 17 2025
STATUS
approved
