# Does a representation $d=a^2-2b^2$ with coprime integers always exist?

I studied which differences $a-b$ are possible in primitive pythagorean triples $(a/b/c)$.

I noticed that the difference $d$ must be odd and contains only prime factors with quadratic residue $2$, in other words primes of the form $8k\pm 1$.

My conjecture is that this condition is also sufficient. To prove that I need the following :

Every prime $p$ of the form $8k\pm 1$ can be written as $p=a^2-2b^2$ (Infinite descent might be a possibility to prove it)

If two numbers $m,n$ are of the form $a^2-2b^2$ with coprime integers $a,b$, then so is the product $mn$.

I found out the idendity $$(a^2-2b^2)(c^2-2d^2)=(ac+2bd)^2-2(ad+bc)^2$$ which could be helpful.

• Possible duplicate of Express a prime $p$ as $p=a^2-2b^2$ – lulu May 21 '18 at 9:11
• @lulu This answers one part, but what about the part with the coprime integers ? Aditionally, a proof not using Thue's lemma would be nice. – Peter May 21 '18 at 9:14
• I thought that followed from the general theory, but trying to write it out I don't see how to prove it. Seems easy to prove that the only primes which divide both $ac+2bd,ad+bc$ must also divide $m$ and $n$. Not sure how to finish from there. – lulu May 21 '18 at 9:29