Details and Options
"Lüroth" can also be written as "Lueroth" when passed as an argument.
The Engel expansion representation {a_{1},a_{2},a_{3},…} corresponds to the expression 1/a_{1}+1/a_{1}a_{2}+1/a_{1}a_{2}a_{3}+….
The Pierce expansion (alternating Engel expansion) representation {a_{1},a_{2},a_{3},…} corresponds to the expression 1/a_{1}-1/a_{1}a_{2}+1/a_{1}a_{2}a_{3}-….
The Sylvester expansion representation {a_{1},a_{2},a_{3},…} corresponds to the expression 1/a_{1}+1/a_{2}+1/a_{3}+….
The Cantor expansion representation {a_{1},a_{2},a_{3},…} corresponds to the expression a_{1}*1!+a_{2}*2!+a_{3}*3!+….
The Cantor product expansion representation {a_{1},a_{2},a_{3},…} corresponds to the expression (1+1/a_{1})(1+1/a_{2})(1+1/a_{3})….
The Lüroth expansion representation {a_{1},a_{2},a_{3},…} corresponds to the expression 1/a_{1} + 1/a_{1}(a_{1}-1)a_{2} + 1/a_{1}(a_{1}-1)a_{2}(a_{2}-1)a_{3}+….
The Oppenheim expansion representation {d_{1},d_{2},d_{3},…} corresponds to the expression 1/d_{1}+(a_{1}/b_{1})(1/d_{2})+(a_{1}a_{2}/b_{1}b_{2})(1/d_{2})+…f.
The Oppenheim expansion requires explicit specification of the constants a and b as defined in the original paper by A. Oppenheim.
ResourceFunction["NumberExpansion"][x, n, r, s, p, q, "Oppenheim"] generates a list of the first n terms in the Oppenheim series representation of x where a_{i}=r+s*d_{i} and b_{i}=p+q*d_{i} , i=1,2,….,n.
The x can be either an exact or an inexact number.
For exact numbers, ResourceFunction["NumberExpansion"][x, t ] can be used if x is rational.
Since irrational numbers always yield an infinite sequence, the number of terms has to be specified explicitly.
Since the series expansion representation for a rational number has only a limited number of terms, ResourceFunction["NumberExpansion"][x, n, t] may yield a list with fewer than n elements in this case.
Lüroth expansion always gives a terminating sequence, or an infinite periodic sequence for rational numbers. The latter is represented as {p,{a_{1},a_{2},a_{3},…,a_{p}}}, where p is the periodicity.
Resource function
FromNumberExpansion reconstructs a number from the result of
ResourceFunction["NumberExpansion"].