OFFSET
1,4
COMMENTS
n continued fraction terms is convergent c(n) = Fibonacci(n+1)/Fibonacci(n).
Further continued fraction terms are taken to be unknown and the worst case (maximum absolute difference) is a single additional 1 and so at worst c(n+1).
a(n) is therefore the length of agreement between c(n) and c(n+1).
It is expected n/a(n) -> 1/log_10(1+phi) = A392067 due to the magnitude of abs(c(n) - c(n+1)), but proving this depends on not having runs of consecutive equal terms long enough to push the ratio to some higher constant infinitely often.
Runs of consecutive equal terms occur when c(n) and c(n+1) span a run of 0 digits or 9 digits in the golden ratio and only several more continued fraction terms can narrow that interval enough to be sure whether 0's or 9's.
Any run of equal terms is finite since the golden ratio is not of the form x/10^y.
LINKS
Jwalin Bhatt, Table of n, a(n) for n = 1..10000
EXAMPLE
For n=7, the continued fraction of 7 terms is c(n) = [1; 1,1,1,1,1,1] = 21/13 and the worst case continuation is c(n+1) = 34/21,
21/13 = 1.61 53...
34/21 = 1.61 90...
^ ^^ a(7) = 3 places agree
MATHEMATICA
a[1]=0; a[n_]:=LengthWhile[RealDigits[N[FromContinuedFraction[Table[1, n]], n]][[1]]-RealDigits[N[FromContinuedFraction[Table[1, n+1]], n]][[1]], #==0&]; Array[a, 71] (* James C. McMahon, Feb 13 2026 *)
PROG
(Python)
from sympy import floor, fibonacci
from fractions import Fraction
from os.path import commonprefix
def reliable_digits_from_frac(bound1, bound2, prec):
order = 10**prec
trunc_bound1 = floor(bound1*order) / order
trunc_bound2 = floor(bound2*order) / order
return commonprefix([f'{trunc_bound1:.{prec}f}', f'{trunc_bound2:.{prec}f}'])
def a(n):
bound1 = Fraction(fibonacci(n+1), fibonacci(n))
bound2 = Fraction(fibonacci(n+2), fibonacci(n+1))
rel_digits = reliable_digits_from_frac(bound1, bound2, n)
return len(rel_digits) - 1 if rel_digits else 0
CROSSREFS
KEYWORD
nonn
AUTHOR
Jwalin Bhatt, Jan 27 2026
STATUS
approved
