### Calculating the simple continued fraction of log_{b}a

This performs an algorithm from T.H. Jackson and K.R. Matthews, *On Shanks' algorithm for computing the continued fraction of log*_{b}a, Journal of Integer Sequences **5** (2002) article 02.2.7.

We run the algorithm for c = d^{r}, 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 log_{b}a.

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.

*Last modified 20th January 2005*

Return to main page