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 A010186 #43 Dec 14 2023 06:12:23 %S A010186 11,5,1,1,5,22,5,1,1,5,22,5,1,1,5,22,5,1,1,5,22,5,1,1,5,22,5,1,1,5,22, %T A010186 5,1,1,5,22,5,1,1,5,22,5,1,1,5,22,5,1,1,5,22,5,1,1,5,22,5,1,1,5,22,5, %U A010186 1,1,5,22,5,1,1,5,22,5,1,1,5 %N A010186 Continued fraction for sqrt(125). %C A010186 Periodic with period [5,1,1,5,22] of length 5 (after the initial term). - _M. F. Hasler_, Sep 09 2011 %H A010186 Vincenzo Librandi, <a href="/A010186/b010186.txt">Table of n, a(n) for n = 0..300</a> %H A010186 G. Xiao, <a href="http://wims.unice.fr/~wims/en_tool~number~contfrac.en.html">'Contfrac' tool on WIMS</a>. %H A010186 <a href="/index/Con#confC">Index entries for continued fractions for constants</a> %H A010186 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,1). %F A010186 G.f.: (11+5*x+x^2+x^3+5*x^4+11*x^5)/((1-x)*(1+x+x^2+x^3+x^4)). - _Bruno Berselli_, Sep 10 2011 %F A010186 a(n) = a(n-5) for n >= 6. - _Wesley Ivan Hurt_, Mar 01 2023 %t A010186 ContinuedFraction[Sqrt[125], 300] (* _Vladimir Joseph Stephan Orlovsky_, Mar 12 2011 *) %t A010186 LinearRecurrence[{0,0,0,0,1},{11,5,1,1,5,22},80] (* or *) PadRight[ {11},80,{22,5,1,1,5}] (* _Harvey P. Dale_, Oct 05 2016 *) %o A010186 (PARI) default(realprecision,199); contfrac(sqrt(125)) \\ __M. F. Hasler_, Sep 09 2011 %o A010186 (PARI) a(n)=[22, 5, 1, 1, 5][n%5+1]-11*!n \\ _M. F. Hasler_, Sep 09 2011 %o A010186 (Python) %o A010186 from sympy import sqrt %o A010186 from sympy.ntheory.continued_fraction import continued_fraction_iterator %o A010186 def aupton(nn): %o A010186 gen = continued_fraction_iterator(sqrt(125)) %o A010186 return [next(gen) for i in range(nn+1)] %o A010186 print(aupton(74)) # _Michael S. Branicky_, Nov 05 2021 %o A010186 (Python) # second version based on linear recurrence %o A010186 def a(n): return 11 if n == 0 else [5, 1, 1, 5, 22][(n-1)%5] %o A010186 print([a(n) for n in range(75)]) # _Michael S. Branicky_, Nov 05 2021 %Y A010186 Cf. A172074. %K A010186 nonn,cofr,easy,nice %O A010186 0,1 %A A010186 _N. J. A. Sloane_