The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A031688 Numbers k such that the continued fraction for sqrt(k) has odd period and central terms 100. 2

%I

%S 2501,123953,203482,204385,206197,304825,425273,568741,726193,727898,

%T 734738,906665,1119805,1124041,1334554,1341493,1346129,1565626,

%U 1568129,1570634,1573141,1578161,1580674,1583189,1590746,1593269,1828633,2126605,2138285,2144137

%N Numbers k such that the continued fraction for sqrt(k) has odd period and central terms 100.

%H Chai Wah Wu, <a href="/A031688/b031688.txt">Table of n, a(n) for n = 1..1000</a>

%t cf100Q[n_]:=Module[{s=Sqrt[n],cf,len},cf=If[IntegerQ[s],{1,1}, ContinuedFraction[ s][[2]]];len=Length[cf];OddQ[len] && cf[[(len+1)/2]] == 100]; Select[Range[2200000],cf100Q] (* _Harvey P. Dale_, May 29 2016 *)

%o (Python)

%o from sympy import continued_fraction_periodic

%o A031688_list = [n for n, s in ((i, continued_fraction_periodic(0,1,i)[-1]) for i in range(1,10**5)) if isinstance(s, list) and len(s) % 2 and s[(len(s)-1)//2] == 100] # _Chai Wah Wu_, Jun 11 2017

%K nonn

%O 1,1

%A _David W. Wilson_

%E Definition corrected and terms corrected and extended by _Harvey P. Dale_, May 29 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 1 09:36 EDT 2021. Contains 346385 sequences. (Running on oeis4.)