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 A351139 #19 Feb 09 2022 16:40:45 %S A351139 3,14,216,25185,23287359,1953082923,81112983931776,6667182474680388, %T A351139 699567746120736710880,855784807474766398870755, %U A351139 51592564054278677032777194015,1474855822717073602911008555048040,23175672095781915301598668218548941215,474577479777785868138090462593743556930231 %N A351139 a(n) is the least k such that the continued fraction for sqrt(k) has periodic part [r, 1, 2, ..., n-1, n, n-1, ..., 1, 2r] for some positive integer r. %e A351139 a(3) = 216 because the continued fraction of sqrt(216) has periodic part [14; 1, 2, 3, 2, 1, 28] and this is the least number with this property. %o A351139 (Python) %o A351139 from itertools import count %o A351139 from sympy.ntheory.continued_fraction import continued_fraction_reduce %o A351139 def A351139(n): %o A351139 if n == 2: %o A351139 return 14 %o A351139 for r in count(1): %o A351139 if (k := continued_fraction_reduce([r,list(range(1,n+1))+list(range(n-1,0,-1))+[2*r]])**2).is_integer: %o A351139 return k # _Chai Wah Wu_, Feb 09 2022 %Y A351139 Cf. A013646. %K A351139 nonn %O A351139 1,1 %A A351139 _Giorgos Kalogeropoulos_, Feb 02 2022