Calculating the simple continued fraction of logba
This runs an algorithm from T.H. Jackson and K.R. Matthews, On Shanks' algorithm for computing the continued fraction of logba, Journal of Integer Sequences 5 (2002) article 02.2.7.
We run the algorithm for c=dr, r=m,...,n.
Here a, b, d, m, n are positive integers satisfying a > b > 1, d > 1 and 1 ≤ m ≤ n.
We are able to guess at partial quotients for the continued fraction expansion of logba.
Taking d = 10 and m = n = r, we expect about r partial quotients to be returned.
To get an idea of the correct answer when m = n = r, we recommend instead taking m = r - t, n = r + t, with 1 ≤ t ≤ (say) 5.
Last modified 20th January 2005
Return to main page