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 = br, r = m,...,n (suggested by Alan Offer).
Here a, b, m, n are positive integers satisfying a > b > 1, and 1 ≤ m ≤ n.
We find that if we add the restriction Ai,c > c + √c and A'i,c > c + √c, we get better results, though this restriction does not seem to be needed when a = b+1.

With c = br, we have found that apart from some initial exceptional values of r, the correct partial quotients will be returned. In fact, if a=b+1, it seems that the correct partial quotients are always returned.
This is a BCMath version of the BC program log

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

Last modified 8th may 2018
Return to main page