OFFSET
1,2
COMMENTS
Also the sum of all the partial quotients in the continued fraction for all rational k/n, for 1 <= k <= n. - Jeffrey Shallit, Jan 31 2023
LINKS
C. Aistleitner, B. Borda, and M. Hauke, On the distribution of partial quotients of reduced fractions with fixed denominator, ArXiv preprint arXiv:2210.14095 [math.NT], October 25 2022.
M. Shrader-Frechette, Modified Farey sequences and continued fractions, Math. Mag., 54 (1981), 60-63.
A. C. Yao and D. E. Knuth, Analysis of the subtractive algorithm for greatest common divisors, Proc. Nat. Acad. Sci. USA 72 (1975), 4720-4722.
FORMULA
Yao and Knuth proved that a(n) is asymptotically (6/Pi)^2*n*(log n)^2. - Jeffrey Shallit, Jan 31 2023
MAPLE
a:= n-> add(add(i, i=convert(k/n, confrac)), k=1..n):
seq(a(n), n=1..60); # Alois P. Heinz, Jan 31 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved