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.
 A: Solutions of the equation:  $$x^2-y^2=2(z^2-g^2)$$ 
you can easily write:  
$$x=2k^2+a^2-2q^2$$    
$$y=2k^2-a^2-2q^2+4aq-4ak$$   
$$z=a^2-2q^2-2k^2+4kq-2ak$$   
$$g=2k^2+a^2+2q^2-4kq-2aq$$  
When $a$ - odd. Formula gives an odd decision.   
Though it is necessary to write a more General solution of the equation. 
$$x^2-y^2=t(z^2-g^2)$$ 
The formula looks like this: 
$$x=tk^2+a^2-tq^2$$  
$$y=tk^2-a^2-tq^2-2tak+2taq$$  
$$z=a^2-tq^2-tk^2+2tqk-2ak$$  
$$g=a^2+tk^2+tq^2-2tkq-2aq$$
I thought I would guess. Not much different form it looks like this.
$$x=p^2+ts^2+k^2-2pk-2tsk$$
$$y=p^2-ts^2+k^2-2pk+2tsp$$
$$z=p^2-ts^2-k^2+2ks-2ps$$
$$g=p^2+ts^2-k^2$$
For our case, the number $p,k$ - different parity.
A: Let $m=rs=tu$ be odd, $k\ge2$. Then $$2^km=(2^{k-2}r+s)^2-(2^{k-2}r-s)^2$$ and $$2^{k+1}m=(2^{k-1}t+u)^2-(2^{k-1}t-u)^2$$ So $$o_1=2^{k-1}t+u,\\o_2=|2^{k-1}t-u|,\\o_3=2^{k-2}r+s,\\o_4=|2^{k-2}r-s|$$ with $k\ge2$ and $rs=tu$ gives all solutions. 
A: 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  $$
A: Given the condition, let use write
\begin{eqnarray}
o_1 &=& o,\\
o_2 &=& o - 4p,\\
o_3 &=& o - 2q,\\
o_4 &=& o - 2 r.
\end{eqnarray}
Then we get

$$
o\Big(p+q-r\Big)=2p^2+q^2-r^2.
$$
Case 1
When
$$
p+q-r = 0,
$$
we obtain
$$
p \Big( p -2q \Big) = 0,
$$
so we obtain
\begin{eqnarray}
o_1 &=& 1 + 2 v + 8 w,\\
o_2 &=& 1 + 2 v,\\
o_3 &=& 1 + 2 v + 6 w,\\
o_4 &=& 1 + 2 v + 2 w.
\end{eqnarray}
This gives for example
$$
\begin{array}{cc|cccc}
v & w & o_1 & o_2 & o_3 & o_4\\
\hline
0 & 1 & 9 & 1 & 7 & 3\\
0 & 2 & 17 & 1 & 13 & 5\\
0 & 3 & 25 & 1 & 19 & 7\\
1 & 1 & 11 & 3 & 9 & 5\\
1 & 2 & 19 & 3 & 15 & 7\\
1 & 3 & 27 & 3 & 21 & 9\\
2 & 1 & 13 & 5 & 11 & 7\\
2 & 2 & 21 & 5 & 17 & 9\\
2 & 2 & 29 & 5 & 23 & 11\\
\end{array}
$$
Case 2
When
$$
p+q-r \ne 0,
$$
we can write
$$
r = p + q - a,
$$
so we obtain
$$
a o = 2 p^2 + q^2 - \Big( p + q - a \Big)^2
= p \Big( p - 2q \Big) - a^2  + 2ap + 2aq,
$$
whence
$$
p = ak,
$$
thus
$$
o = a \Big( k^2 + 2k - 1 \Big) - 2 \Big( k - 1 \Big) q.
$$
However, $o$ is odd and therefore $a$ is odd and $k$ is even, whence
$$
o = \Big(2 u + 1 \Big) \Big( 4 v^2 + 4 v - 1 \Big) - 2 \Big( 2 v - 1 \Big) w.
$$
So we obtain
\begin{eqnarray}
o_1 &=& \Big(2 u + 1 \Big) \Big( 4 v^2 + 4 v - 1 \Big) - 2 \Big( 2 v - 1 \Big) w,\\
o_2 &=& \Big(2 u + 1 \Big) \Big( 4 v^2 - 4 v - 1 \Big) - 2 \Big( 2 v - 1 \Big) w,\\
o_3 &=& \Big(2 u + 1 \Big) \Big( 4 v^2 + 4 v - 1 \Big) - 2 \Big( 2 v + 1 \Big) w,\\
o_4 &=& \Big(2 u + 1 \Big) \Big( 4 v^2 - 4 v - 1 \Big) - 2 \Big( 2 v + 1 \Big) w.
\end{eqnarray}
