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 22.
0

%I #14 Jul 06 2024 15:57:15

%S 486,498,502,514,526,534,542,562,566,574,1092,1101,1119,1137,1149,

%T 1191,1209,1236,1257,1263,1281,1293,1940,1948,1964,1972,1996,2012,

%U 2036,2044,2060,2076,2084,2092,2108,2124,2132,2140,2156,2164,2188,2204,2220,2228

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

%t cf22Q[n_]:=Module[{s=Sqrt[n],cf,len},cf=If[IntegerQ[s],{1},ContinuedFraction[ s][[2]]];len=Length[cf];EvenQ[len]&&cf[[len/2]] == 22]; Select[Range[2300],cf22Q] (* _Harvey P. Dale_, Jul 07 2020 *)

%K nonn

%O 1,1

%A _David W. Wilson_