Calculating the simple continued fraction of logba

This performs an algorithm based on a paper of 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 employ the criterion Ai,c > c + b2√c in the main loop and conjecture that correct partial quotients are returned.

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

Last modified 16th November 2018
Return to main page