A010341 Sum of all terms except last in period of continued fraction for sqrt(n).
0, 0, 1, 0, 0, 2, 3, 1, 0, 0, 3, 2, 4, 4, 1, 0, 0, 4, 9, 2, 6, 10, 5, 1, 0, 0, 5, 8, 6, 2, 15, 3, 4, 6, 1, 0, 0, 6, 4, 3, 4, 2, 17, 8, 8, 22, 7, 1, 0, 0, 7, 12, 8, 12, 6, 2, 8, 6, 13, 4
Offset: 1
Keywords
Links
- T. D. Noe, Table of n, a(n) for n=1..2000
Crossrefs
Cf. A010340
Programs
-
Mathematica
Table[With[{s=Sqrt[n]},If[IntegerQ[s],0,Total[Most[ContinuedFraction[s][[2]]]]]],{n,60}] (* Harvey P. Dale, Jul 20 2025 *)