<s>[INST] Can't find n (algebraic manipulation) I‘m trying to understand a proof on my textbook that says $\sqrt {n − 1} +\sqrt {n + 1}$ is irrational, where $n \in \mathbb{N} $. However I can't seem to show that
$$n^2 - 1 = \frac{(\frac{p^2}{q^2} - 2n)^2}{4} \to n =  \frac{(p^4+4q^4)}{4p^2q^2}$$,
where $p,q \in \mathbb{Z}$，and the gcd of $p,q$ is 1. I feel really stupid, is there something I don't see?
The furthest I got is
$$n = \frac{\sqrt{2p^4+5p^4-2p^2q^2}-(p^2-q^2)}{2q^2}$$
 [/INST] $$n^2 - 1 = \frac{\left(\dfrac{p^2}{q^2} - 2n\right)^2}{4}= \frac{\dfrac{p^4}{q^4} + 4n^2-4n\dfrac{p^2}{q^2} }{4}=\dfrac {p^4}{4q^4}+n^2-n\dfrac{p^2}{q^2}. $$
Subtract $n^2$ from both sides to get $$-1=\dfrac {p^4}{4q^4} -n\dfrac{p^2}{q^2} ,$$
which is $$n\dfrac{p^2}{q^2}=1+\dfrac {p^4}{4q^4}.$$
Can  you take it from here (solve for $n$)?
</s>