login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Numbers k such that the continued fraction for sqrt(k) has even period and if the last term of the periodic part is deleted the central term is 63.
0

%I #20 Jul 06 2024 16:07:14

%S 3971,4003,4007,4019,4027,4039,4051,4059,4079,4083,4091,4099,4111,

%T 4127,4131,4139,4151,4159,4183,4207,4211,4219,4223,15880,15936,15944,

%U 15968,15976,16000,16064,16160,16192,16224,16232,16288,16328,16424,16480,16544

%N Numbers k such that the continued fraction for sqrt(k) has even period and if the last term of the periodic part is deleted the central term is 63.

%C The "central term" is the term appearing at 1/2 the length of the period of the continued fraction, not the term succeeding that term. For instance, the periodic part of the continued fraction of sqrt(4139) is {2, 1, 63, 1, 2, 128}. - _Harvey P. Dale_, Sep 07 2012

%t ct63Q[n_]:=Module[{sqrt=Sqrt[n],cf,len},cf=If[IntegerQ[sqrt],{1},ContinuedFraction[sqrt][[2]]];len=Length[cf];EvenQ[len] && cf[[len/2]]==63]; Select[ Range[17000],ct63Q] (* _Harvey P. Dale_, Sep 07 2012 *)

%K nonn

%O 1,1

%A _David W. Wilson_