Bolya Expansion

Author

Eric W. Weisstein
October 31, 2004

This notebook downloaded from http://mathworld.wolfram.com/notebooks/NumberTheory/BolyaExpansion.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/BolyaExpansion.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Additional Authors

BolyaiRoot by
Michael Trott
The Mathematica GuideBook for Programming.
New York: Springer-Verlag, p. 80-81, 2004

Code

BolyaiRoot[x_,m_Integer?Positive,n_Integer?Positive]:=IntegerPart[x]-1+Fold[(#1+#2)^(1/m)&,0,Reverse[IntegerPart[(1+#)^m-1]&/@NestList[FractionalPart[(1+#)^m-1]&,FractionalPart[x],n]]]