login
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 12.
1

%I #14 Jul 06 2024 15:54:09

%S 146,158,162,166,178,194,327,366,372,381,393,417,429,438,580,596,604,

%T 628,636,652,668,684,692,700,716,724,740,748,764,772,780,905,945,955,

%U 995,1005,1030,1055,1070,1195,1205,1220,1302,1338,1434,1578,1614,1626,1758

%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 12.

%H Harvey P. Dale, <a href="/A031510/b031510.txt">Table of n, a(n) for n = 1..1000</a>

%t epct12Q[n_]:=Module[{s=Sqrt[n],cf,len},cf=If[IntegerQ[s],{1}, ContinuedFraction[ s][[2]]];len=Length[cf];EvenQ[len]&&cf[[len/2]] == 12]; Select[Range[2000],epct12Q] (* _Harvey P. Dale_, Jan 04 2015 *)

%K nonn

%O 1,1

%A _David W. Wilson_