Details and Options
"Lüroth" can also be written as "Lueroth" when passed as an argument.
The Engel expansion representation {a1,a2,a3,…} corresponds to the expression 1/a1+1/a1a2+1/a1a2a3+….
The Pierce expansion (alternating Engel expansion) representation {a1,a2,a3,…} corresponds to the expression 1/a1-1/a1a2+1/a1a2a3-….
The Sylvester expansion representation {a1,a2,a3,…} corresponds to the expression 1/a1+1/a2+1/a3+….
The Cantor expansion representation {a1,a2,a3,…} corresponds to the expression a1*1!+a2*2!+a3*3!+….
The Cantor product expansion representation {a1,a2,a3,…} corresponds to the expression (1+1/a1)(1+1/a2)(1+1/a3)….
The Lüroth expansion representation {a1,a2,a3,…} corresponds to the expression 1/a1 + 1/a1(a1-1)a2 + 1/a1(a1-1)a2(a2-1)a3+….
The Oppenheim expansion representation {d1,d2,d3,…} corresponds to the expression 1/d1+(a1/b1)(1/d2)+(a1a2/b1b2)(1/d2)+…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 ai=r+s*di and bi=p+q*di , 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,{a1,a2,a3,…,ap}}, where p is the periodicity.
Resource function
FromNumberExpansion reconstructs a number from the result of
ResourceFunction["NumberExpansion"].