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 A062769 #31 Nov 30 2023 09:59:55 %S A062769 2,41,13,58,106,61,193,109,157,337,181,586,457,949,821,601,613,1061, %T A062769 421,541,1117,1153,1249,1069,1021,1201,1669,2381,1453,2137,2053,1801, %U A062769 2293,1381,1549,3733,3541,3217,5857,1621,3169,4657,2689,3049,2389,4057,4549 %N A062769 Smallest number m such that the continued fraction expansion of sqrt(m) has period 2n + 1. %C A062769 If the continued fraction for sqrt(N) has period (2k + 1) and k-th convergent P(k)/Q(k) [taking P(-1)=1; Q(-1)=0 where necessary], then the i-th positive solution V(i) = [x(i),y(i)] to the Pell equation x^2 - N*y^2 = 1 satisfies the recurrence V(i+2) = 2*A*V(i+1) - V(i) starting with V(0)=(1,0); V(1) = (A,B) where A = 2*S^2 + 1; B = 2*S*T and S = P(k)*Q(k) + P(k-1)*Q(k-1); T = Q(k)^2 + Q(k-1)^2. %H A062769 Michael De Vlieger, <a href="/A062769/b062769.txt">Table of n, a(n) for n = 0..1000</a> (Terms 0..999 from T. D. Noe) %H A062769 Dario Alpern, <a href="https://www.alpertron.com.ar/CONTFRAC.HTM">Continued Fraction calculator</a>. %H A062769 Keith Matthews, <a href="http://www.numbertheory.org/php/surd.html">Calculating the simple continued fraction of a quadratic irrational</a>. %H A062769 Ulrich Sondermann, <a href="https://web.archive.org/web/20100725074902/http://home.earthlink.net:80/~usondermann/contfrac.html">Continued Fractions</a>. %H A062769 Gang Xiao, <a href="https://wims.univ-cotedazur.fr/~wims/en_tool~number~contfrac.en.html">Contfrac,continued fraction expansion server with k-th convergent calculator</a>. %e A062769 For n = 2, 2n+1 = 5. a(2) = 13 and we indeed have sqrt(13) = [3; 1, 1, 1, 1, 6] with period 5, the first one in the sequence sqrt(29) = [5; 2, 1, 1, 2, 10], sqrt(53) = [7; 3, 1, 1, 3, 14], sqrt(74) = [8; 1, 1, 1, 1, 16], sqrt(85) = [9; 4, 1, 1, 4, 18], sqrt(89) = [9; 2, 3, 3, 2, 18], ... %t A062769 nn = 50; t = Table[0, {nn}]; n = 1; found = 0; While[found < nn, n++; If[! IntegerQ[Sqrt[n]], c = ContinuedFraction[Sqrt[n]]; len = Length[c[[2]]]; If[OddQ[len] && (len + 1)/2 <= nn && t[[(len + 1)/2]] == 0, t[[(len + 1)/2]] = n; found++]]]; t (* _T. D. Noe_, Apr 04 2014 *) %Y A062769 Cf. A013646, A003814, A031396, A003654. %K A062769 nonn %O A062769 0,1 %A A062769 _Lekraj Beedassy_, Jul 17 2001 %E A062769 More terms from _Naohiro Nomoto_, Jan 01 2002