OFFSET
1,1
MATHEMATICA
okQ[n_] := Module[{cf, p}, cf = ContinuedFraction[Sqrt[n]]; p = FindTransientRepeat[cf, 2][[1, 2]]; EvenQ[lp = Length[p]] && p[[lp/2]] == 28];
Reap[Do[If[okQ[n], Sow[n]], {n, 1, 3340}]][[2, 1]] // Quiet (* Jean-François Alcover, Dec 14 2017 *)
cf28Q[n_]:=Module[{s=Sqrt[n], cf, len}, cf=If[IntegerQ[s], {1}, ContinuedFraction[ s][[2]]]; len=Length[cf]; EvenQ[len]&&cf[[len/2]] == 28]; Select[ Range[3400], cf28Q] (* Harvey P. Dale, Jun 03 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved