<s>[INST] Find odd numbers $(o_1,o_2,o_3,o_4)$ such that $o_1^2-o_2^2=2(o_3^2-o_4^2)$ such that $o_1>o_2$ and $o_3>o_4$ I am working on a graph labeling problem and am stuck at the following problem on odd numbers.
Find (all) odd numbers $(o_1,o_2,o_3,o_4)$ such that $o_1^2-o_2^2=2(o_3^2-o_4^2)$ such that $o_1>o_2$ and $o_3>o_4$?
Ideally I would like to prove that no such 4-tupule $(o_1,o_2,o_3,o_4)$ exists. However if they exist, I want to count, for given $n$, how many such 4-tupules exists such that the largest odd number i.e. $o_1 \leq n$.
My approach: Say the 4-tupule is $(2p+1,2q+1,2r+1,2s+1)$. The above equation simplifies to $(p-q)(p+q+1) = 2(r-s)(r+s+1)$. I am stuck here..
Thanks for going through this.
 [/INST] Describing all solutions is quite intricate. However, with composite $n \equiv 3 \pmod 8$ where all prime factors of $n$ are $1,3 \pmod 8,$ then there are multiple expressions as $u^2 + 2 v^2;$ with two solutions, you can arrange in your pattern. The predictable kind are illustrated below: if $n$ is the product of $r$ distinct primes, an odd number of which are $3 \bmod 8$ and the others $1 \bmod 8,$ then there will be $2^{r-1}$ different expressions $n=u^2 + 2 v^2$ with positive integers $u,v.$
here are some
 51 == 3 = 3 *  17
123 == 3 = 3 *  41
187 == 3 = 11 *  17
219 == 3 = 3 *  73
267 == 3 = 3 *  89
291 == 3 = 3 *  97
323 == 3 = 17 *  19

So
$$  51 = 7^2 + 2 \cdot 1^2 =  1^2 + 2 \cdot 5^2   $$
$$  123 = 11^2 + 2 \cdot 1^2 =  5^2 + 2 \cdot 7^2   $$
$$  187 = 13^2 + 2 \cdot 3^2 =  5^2 + 2 \cdot 9^2   $$
.........
$$  627 = 25^2 + 2 \cdot 1^2 =  23^2 + 2 \cdot 7^2  =  17^2 + 2 \cdot 13^2  =  7^2 + 2 \cdot 17^2  $$
...........
$$  2091 = 43^2 + 2 \cdot 11^2 =  37^2 + 2 \cdot 19^2  =  29^2 + 2 \cdot 25^2  =  13^2 + 2 \cdot 31^2  $$
</s>