OFFSET
0,1
MAPLE
V:= Array(0..50): count:= 0:
with(NumberTheory):
for i from 2 while count < 51 do
if issqr(i) then next fi;
cf:= Term(ContinuedFraction(sqrt(i)), periodic);
v:= numboccur(cf[2], 2);
if v <= 50 and V[v] = 0 then
V[v]:= i; count:= count+1;
fi;
od:
convert(V, list); # Robert Israel, May 13 2024
MATHEMATICA
nn = 50; zeros = nn; t = Table[0, {nn}]; k = 2; While[zeros > 0, If[! IntegerQ[Sqrt[k]], cnt = Count[ContinuedFraction[Sqrt[k]][[2]], 2]; If[cnt <= nn && t[[cnt]] == 0, t[[cnt]] = k; zeros--]]; k++]; Join[{5}, t]
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Mar 19 2012
EXTENSIONS
Corrected by Robert Israel, May 13 2024
STATUS
approved