Calculating the simple continued fraction of logba

This performs 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.
We recommend taking m = r – t, n = r + t, with 1 ≤ t ≤ (say) 5 to guess the correct answer.

Enter a:
Enter b:
Enter d:
Enter m:
Enter n:

Last modified 20th January 2005
Return to main page