TITLE: Is the set $\ \left\{ \frac{b-a }{c-a}:\ (a,b,c)\ \text{is a primitive Phythagorean triple with}\ a<b<c\ \right\}\ $ dense in $\ [0,1]\ ?$
QUESTION [5 upvotes]: Is the set $\ \left\{ \frac{b-a }{c-a}:\ (a,b,c)\ \text{is a primitive Pythagorean triple with}\ a<b<c\ \right\}\ $ dense in $\ [0,1]\ $ and how do you show this?
It seems likely true based on glancing at the tree in the picture, however I am not very knowledgeable on the properties of Primitive Pythagorean triples...

REPLY [2 votes]: Consider the function $$f(x) = 1-\frac{2}{x^2-2x+1}$$
This function is continuous, maps the interval $(1+\sqrt{2},\infty)$ onto $(0,1)$ and it's increasing.
Choose any interval $(u,v) \subseteq [0,1]$, the preimage of $(u,v)$ under $f$ is the interval $(f^{-1}(u),f^{-1}(v))$. Choose a rational $r/s \in (f^{-1}(u),f^{-1}(v))$ with $r$ and $s$ odd and coprime. (It's known that $\Bbb Q$ is dense in $\Bbb R$, but it's not hard to see that if you restrict to rationals with odd numerators and denominators it's still dense).
Then $f(r/s) \in (u,v)$.
But $$f(r/s) = 1- \frac{2}{(r/s)^2-2 r/s + 1}= \frac{\frac{r^2-s^2}{2}-rs}{\frac{r^2+s^2}{2}-r s} = \frac{b - a}{c-a}$$
where we defined $a=rs$, $b=\frac{r^2-s^2}{2}$ and $c=\frac{r^2+s^2}{2}$.
The triple $(a,b,c)$ is a primitive Pythagorean triple with $a<b<c$ and $\frac{b-a}{c-a} \in (u,v)$. Since $(u,v)$ was any interval contained in $[0,1]$, the set is dense.