login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A020640 Increasing periods of continued fraction for sqrt(n) (period of continued fraction for sqrt(A013645(n))). 2

%I #19 Dec 28 2023 13:12:51

%S 1,2,4,5,6,8,10,12,16,18,20,22,26,34,37,40,42,44,48,52,54,60,62,64,70,

%T 76,79,88,94,96,102,104,108,114,118,122,130,136,152,156,158,170,172,

%U 174,194,196,202,207,210,217,228,234,238,239,248,262,268,280,281

%N Increasing periods of continued fraction for sqrt(n) (period of continued fraction for sqrt(A013645(n))).

%H Patrick McKinley, <a href="/A020640/b020640.txt">Table of n, a(n) for n=1..512</a>

%t per[n_] := ContinuedFraction[Sqrt[n]][[2]] // Length; record = 0; t = Reap[For[n = 1, n < 2*10^4, n++, If[ !IntegerQ[Sqrt[n]], p = per[n]; If[p > record, record = p; Print[{n, p}]; Sow[{n, p}]]]]][[2, 1]]; A020640 = t[[All, 2]] (* _Jean-François Alcover_, Dec 27 2012 *)

%t DeleteDuplicates[Table[If[IntegerQ[Sqrt[n]],Nothing,Length[ContinuedFraction[Sqrt[n]][[2]]]],{n,20000}],GreaterEqual] (* _Harvey P. Dale_, Dec 28 2023 *)

%K nonn,nice

%O 1,2

%A _David W. Wilson_

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 03:03 EDT 2024. Contains 371798 sequences. (Running on oeis4.)