1

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.

4 Answers4

1

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.

individ
  • 4,405
  • It does not give all solutions, as $9^2-1^1 = 2\Big(7^2-3^2\Big)$, so $x=9$ and $y=1$, thus $x+y = 10$, but $x+y= 4\Big(k^2-q^2+aq-ak\Big)$, but $x+y= 4\Big(k^2-q^2+aq-ak\Big) = 10$ is a contradiction as 10 is not a 4-fold. – johannesvalks Jul 21 '14 at 08:39
  • 1
    Put in the last formula. $ k=3 $ : $ p=-2 $ : $s=2$ . – individ Jul 21 '14 at 17:19
  • Another formula there. I about it I forgot. http://math.stackexchange.com/questions/814045/solutions-to-the-diophantine-equation-2a2-2b2-c2-d2-0/814562#814562 – individ Jul 21 '14 at 17:27
  • Indeed - also a nice link... – johannesvalks Jul 21 '14 at 17:52
1

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.

Gerry Myerson
  • 185,413
  • It does not give all solutions for $k \ge 2$, as $9^2-1^1 = 2\Big(7^2-3^2\Big)$, so $u=4$ and $s=2$, and thus $r=2t$, then $2^{k-1} t = 5$, so $t=5$ and $k=1$. So you must allow also $k \ge 1$, meaning that not all solutions are integers, i.e. no solution at all... – johannesvalks Jul 21 '14 at 08:35
  • $k=3$, $m=5$, $r=1$, $s=5$, $t=1$, $u=5$ gives $o_1=9$, $o_2=-1$, $o_3=7$, $o_4=-3$, so it does give that solution, up to sign. But I will edit in some absolute value signs so I won't need to rely on negative numbers. – Gerry Myerson Jul 21 '14 at 09:40
  • Cool! So indeed need to include absolute values... – johannesvalks Jul 21 '14 at 09:55
  • I like your method better than mine! Easy and short (after the absolute values) Voteup!!! – johannesvalks Jul 21 '14 at 10:07
0

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 $$

Will Jagy
  • 146,052
  • Thanks for the update. Extending the comments above b CalvinLin and LordSoth, I was able to build up a family by taking $p+q = r+s$ to be even and finding 4 tupules such that $p-q = 2(r-s)$. Your's pattern is a new one. –  Jul 21 '14 at 04:32
0

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}

  • 1
    Thanks for the detailed solution. Seems to be complete. Mainly it proves existence of a family of solutions (which is detrimental to me). This question may seem harder to think through but Is this still possible for higher powers of odd numbers. Your solution just proved that my labeling algorithm won't be $O(n^2)$. Just trying to see whether $O(n^3)$ would do. Thanks again for the detailed answer. –  Jul 21 '14 at 09:14
  • These formulas won't give solutions with $o_3>o_1$, unless you allow $w<0$, e.g., the solution $(13,3,21,19)$. In fact, it can only give solutions with $o_1-o_2$ a multiple of 4, so there's no way to get $(13,3,21,19)$. – Gerry Myerson Jul 21 '14 at 09:56
  • Yes there you have a point, I need to go back to the drawing board... – johannesvalks Jul 21 '14 at 10:06