login
Numbers k such that the continued fraction for sqrt(k) has odd period and if the last term of the periodic part is deleted the two central terms are both 20.
0

%I #17 Sep 18 2021 18:33:53

%S 2729,5233,8362,8917,24874,29873,31973,37997,38777,46237,54818,56698,

%T 57173,58129,64129,64634,65141,66161,66674,67189,67706,68746,74713,

%U 87277,88457,89645,90841,100186,101450,104002,104645,115333,116689,126541

%N Numbers k such that the continued fraction for sqrt(k) has odd period and if the last term of the periodic part is deleted the two central terms are both 20.

%t cf20Q[n_]:=Module[{s=Sqrt[n],cf,len},cf=If[IntegerQ[s],{1,1},ContinuedFraction[ s][[2]]];len=Length[cf];OddQ[len]&&cf[[Floor[len/2]]] == cf[[Ceiling[len/2]]] ==20]; Select[ Range[ 130000],cf20Q] (* _Harvey P. Dale_, Sep 18 2021 *)

%Y Subsequence of A003814.

%K nonn

%O 1,1

%A _David W. Wilson_

%E First term 401 removed by _Georg Fischer_, Jun 16 2019