Squeeze fractions with $a^n+b^n=c^n+d^n$ Let $0<x<y$ be real numbers. For which positive integers $n$ do there always exist positive integers $a,b,c,d$ such that $$x<\frac ab<\frac cd<y$$ and $a^n+b^n=c^n+d^n$?
For $n=1$ this is true. Pick any $a,b$ such that $x<\frac ab<y$ -- this always exists by the density of the rationals. Since $\frac{a}{b}=\frac{ka}{kb}$ for any positive integer $k$, it suffices to choose $c=ka+1$ and $d=kb-1$. Since $\lim_{k\rightarrow\infty}\frac{ka+1}{kb-1}=\frac{a}{b}$, there exists $k$ such that $\frac{ka+1}{kb-1}<y$.
 A: Partial answer I: if $x < 1 < y$, then we can find $a,b$ with $\frac{a}{b}, \frac{b}{a}$ arbitrarily close to one, satisfying the requirements for any $n$. Then it can be seen that that it suffices to prove the result for $y<1$ or $1<x$, since we have symmetry about 1 by inversion: $$x < \frac{a}{b} < \frac{c}{d} < y < 1 \iff 1 < \frac{1}{y} < \frac{d}{c} < \frac{b}{a} < \frac{1}{x}$$
Partial answer II: it can always be done for $n=2$.
First suppose we can find $a, b, c, d$ with $x < \frac{a}{b} < \frac{c}{d} < y$ s.t. $a^2 + b^2 = j^2$ and $c^2 + d^2 = k^2$ for some integers $j, k$. Then we would have $(ka)^2 + (kb)^2 = (jc)^2 + (jd)^2$, and hence we would be done. So it suffices to prove that $S = \{ \frac{a}{b} \ | \ a, b\neq0 \in \mathbb{Z}, \exists c \in \mathbb{Z} \ \text{s.t.} \ a^2 + b^2 = c^2 \}$ is dense in $(0, 1)$.
To see that this is the case, consult the identity giving Pythagorean triples: $$(m^2-n^2)^2 + (2mn)^2 = (m^2+n^2)^2;$$
$$v(m,n) := \frac{m^2-n^2}{2mn} = \frac{m}{2n} - \frac{n}{2m}$$
Given some small positive $\varepsilon$, we can take $n$ s.t. $\frac{1}{n} < \varepsilon$. Observe that the derivative of $v$ with respect to $m$ is always positive but strictly decreasing, going to $\frac{1}{2n}$ from above as $m$ goes to infinity. Thus for any positive $k$ we can infer that: $$\frac{1}{2n} < v(n+k+1,n)-v(n+k,n) \leq v(n+1,n)-v(n,n) = \frac{2n+1}{2n+2} \cdot \frac{1}{n} < \varepsilon$$
Since $v(n,n) = 0$, it follows that any value in $(0,1)$ is within $\varepsilon$ of a value in $\{ v(m, n) \ | \ m, n \in \mathbb{Z}, m > n \} \subset S$, so we are done.
