This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A040968 #17 Jul 09 2025 00:08:36 %S A040968 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 A040968 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 A040968 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 A040968 Continued fraction for sqrt(1000). %C A040968 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 A040968 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 A040968 <a href="/index/Con#confC">Index entries for continued fractions for constants</a> %H A040968 <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 A040968 with(numtheory): Digits := 300: convert(evalf(sqrt(1000)),confrac); %t A040968 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 A040968 (PARI) A40968=contfrac(sqrt(1000)) \\ For illustration. Better: %o A040968 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 A040968 Cf. A042936, A042937 (numerators & denominators of convergents). %K A040968 nonn,cofr,easy %O A040968 0,1 %A A040968 _N. J. A. Sloane_