EDIT: Why is my post downvoted? Can somone explain?
Say we have a list of simplified elements where
$$\left\{\left.\frac{(2i+1)^2}{(2z+1)^2}\right|i,z\in\mathbb{Z}\right\}\cap[1,2]$$
and we rearrange the list from elements with the smallest denominator to elements with the largest denominator. From there, I need to shorten the list to elements with a denominator value between $1$ and $p$.
So far I was able to list the simplified elements of the set in $[1,2]$ and arrange the elements from those with the smallest denominator to those with the largest denominator.
h=(2#+1)^2&
l=((2#+1)^2)/((2#2+1)^2)&
DeleteDuplicates[SortBy[Flatten[Table[Table[l[i,z],
{i,Ceiling[((h[z])^(1/2)-1)/2],Floor[((2h[z])^(1/2)-1)/2]}],{z,0,1000}]],{Denominator}]]
Which gives the following result
{1,49/25,81/49,121/81,169/121,225/121,225/169,289/169,289/225,361/225,361/289,44
1/289,529/289, \[CenterEllipsis]168157\[CenterEllipsis]
,7789681/4004001,7812025/4004001,7823209/4004001,7845601/4004001,7856809/4004001
,7879249/4004001,7890481/4004001,7924225/4004001,7946761/4004001,7958041/4004001
,7980625/4004001,7991929/4004001}
large output show less show more show all set size limit...
However, I don't know how to restrict the list of elements to those with a denominator value between $1$ and $p$.