OFFSET
1,1
MATHEMATICA
Table[If[IntegerQ[Sqrt[n]], {}, Total[ContinuedFraction[Sqrt[n]][[2]]]], {n, 100}]//Flatten (* Harvey P. Dale, Apr 26 2016 *)
PROG
(Python)
from math import isqrt
from sympy.ntheory.continued_fraction import continued_fraction_periodic
def A013944(n): return sum(continued_fraction_periodic(0, 1, n+(k:=isqrt(n))+int(n>=k*(k+1)+1))[-1]) # Chai Wah Wu, Jul 20 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Definition corrected by Clark Kimberling, Apr 21 2010
Corrected by Harvey P. Dale, Apr 26 2016
STATUS
approved