Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #15 Nov 02 2019 02:09:59
%S 31,1,1,1,1,1,6,2,2,15,2,2,6,1,1,1,1,1,62,1,1,1,1,1,6,2,2,15,2,2,6,1,
%T 1,1,1,1,62,1,1,1,1,1,6,2,2,15,2,2,6,1,1,1,1,1,62,1,1,1,1,1,6,2,2,15,
%U 2,2,6,1,1,1,1,1,62,1,1,1,1,1,6,2,2,15,2,2,6,1,1,1,1
%N Continued fraction for sqrt(1000).
%C After the initial term, periodic with period (1, 1, 1, 1, 1, 6, 2, 2, 15, 2, 2, 6, 1, 1, 1, 1, 1, 62) of length 18. - _M. F. Hasler_, Nov 02 2019
%H C. Elsner, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL17/Elsner/elsner15.html">On Error Sums for Square Roots of Positive Integers with Applications to Lucas and Pell Numbers</a>, J. Int. Seq. 17 (2014) # 14.4.4
%H <a href="/index/Con#confC">Index entries for continued fractions for constants</a>
%H <a href="/index/Rec#order_18">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1).
%p with(numtheory): Digits := 300: convert(evalf(sqrt(1000)),confrac);
%t ContinuedFraction[Sqrt[1000],120] (* or *) PadRight[{31},120,{62,1,1,1,1,1,6,2,2,15,2,2,6,1,1,1,1,1}] (* _Harvey P. Dale_, Aug 22 2018 *)
%o (PARI) A40968=contfrac(sqrt(1000)) \\ For illustration. Better:
%o A040968(n)={1+if(n%3, abs(n\/18*18-n)>6, n%9, !(n%6)*5, n%18, 14, n, 61, 30)} \\ _M. F. Hasler_, Nov 02 2019
%Y Cf. A042936, A042937 (numerators & denominators of convergents).
%K nonn,cofr,easy
%O 0,1
%A _N. J. A. Sloane_.