login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


A332342
Table T(n, k) read by antidiagonals upwards: sum of the terms of the continued fraction for the fractional part of n/k (n>=1, k>=1).
2
0, 0, 2, 0, 0, 3, 0, 2, 3, 4, 0, 0, 0, 2, 5, 0, 2, 3, 4, 4, 6, 0, 0, 3, 0, 4, 3, 7, 0, 2, 0, 4, 5, 2, 5, 8, 0, 0, 3, 2, 0, 3, 5, 4, 9, 0, 2, 3, 4, 5, 6, 5, 5, 6, 10, 0, 0, 0, 0, 4, 0, 5, 2, 3, 5, 11, 0, 2, 3, 4, 4, 6, 7, 5, 6, 6, 7, 12, 0, 0, 3, 2, 5, 3, 0, 4, 6, 4, 6, 6, 13
OFFSET
1,3
LINKS
Andrey Zabolotskiy, Table of n, a(n) for n = 1..4950 (antidiagonals 1..99)
EXAMPLE
2/7 = 1/(3+1/2), so T(2, 7) = 3 + 2 = 5.
The table begins:
0 2 3 4 5 6 7 8 9 ...
0 0 3 2 4 3 5 4 6 ...
0 2 0 4 4 2 5 5 3 ...
0 0 3 0 5 3 5 2 6 ...
0 2 3 4 0 6 5 5 6 ...
0 0 0 2 5 0 7 4 3 ...
...
MATHEMATICA
t[n_, k_] := Total@ ContinuedFraction@ FractionalPart[n/k];
Flatten[Table[t[nk+k-1, k], {nk, 10}, {k, nk}]]
PROG
(Python)
def cofr(p, q):
return [] if q == 0 else [p // q] + cofr(q, p % q)
def t(n, k):
return sum(cofr(n, k)[1:])
tr = []
for nk in range(1, 20):
for k in range(1, nk+1):
tr.append(t(nk+1-k, k))
print(tr)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Andrey Zabolotskiy, Feb 10 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 20 23:16 EDT 2024. Contains 376078 sequences. (Running on oeis4.)