OFFSET
1,3
COMMENTS
By "simple continued fraction" is meant a continued fraction whose terms are positive integers and the final term is >= 2.
EXAMPLE
Sum_{k=1..7} (-1)^(k+1)/k = 319/420 = 1/(1 + 1/(3 + 1/(6 + 1/(3 + 1/5)))), so a(7) = 5.
MATHEMATICA
Table[Length[ContinuedFraction[Sum[(-1)^(k + 1)/k, {k, 1, n}]]] - 1, {n, 1, 75}]
PROG
(Python)
from fractions import Fraction
from sympy.ntheory.continued_fraction import continued_fraction
def A373893(n): return len(continued_fraction(sum(Fraction(1 if k&1 else -1, k) for k in range(1, n+1))))-1 # Chai Wah Wu, Jun 27 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jun 21 2024
STATUS
approved