1

Find all integral solutions of $x^2+1= y^2+z^2$. Actually I have to find all integral solution of $a(a+1)=b(b+1)+c(c+1)$. I reduced this in the above form I.e., $ (2a+1)^2+1= (2b+1)^2+(2c+1)^2$ .

user90533
  • 604
  • http://math.stackexchange.com/questions/794510/curves-triangular-numbers There are other formulas. – individ Jun 28 '16 at 13:07
  • http://math.stackexchange.com/questions/351491/integral-solutions-of-hyperboloid-x2y2-z2-1/709384#709384 – individ Jun 28 '16 at 13:09

3 Answers3

1

The case where $z^2-x^2=1-y^2=0$ is self-evident.We have $z=\pm x$ and $y=\pm 1$

Now consider the case where $(1-y^2)(z^2-x^2)\neq 0$ $$z^2-x^2=1-y^2$$ $$(z+x)(z-x)=(1+y)(1-y)$$ $$\dfrac{z+x}{1+y}=\dfrac{1-y}{z-x} =\dfrac{p}{q}$$ with $pq\neq 0$ and $\gcd(p,q)=1$.

It follows: $$z+x=\dfrac{p}{q}(1+y)$$ $$z-x=\dfrac{q}{p}{(1-y)}$$

Hence, in order to find all the integral solutions, the following restrictions must apply $$1-y\equiv 0\pmod p$$ $$1+y\equiv 0\pmod q$$

In other words,by alternatively subtracting 1 from 2/ adding 1 and 2 $$qs-pr=2y$$ $$qs+pr=2$$ where $r,s$ are 2 coprime integers. Since $$z+x=ps$$ $$z-x=qr$$

we have: $$z=\dfrac{1}{2}(ps+qr)$$ $$x=\dfrac{1}{2}(ps-qr)$$ $$y=\dfrac{1}{2}(qs-pr)$$where $pr,qs$ have the same parity and $qs+pr=2$.

0

There is a parametrization, most of the restrictions are to cut down on repetition. I found this by working with an answer by Ted Shifrin, Rulings of One Sheet Hyperboloid

Take integers $a,b,c,d.$ Allow $b \geq 0,$ then $a,c,d >0.$

Main restriction: $$ a d - b c = 1. $$ Secondary: $$ a c > b d. $$ Define $$ x = a d + b c, $$ $$ y = a c - b d, $$ $$ z = a c + b d.$$ To reduce repetition, when $y$ is odd, demand $x \leq y.$ Notice that $X$ is always odd because $ad+bc \equiv ad-bc \pmod 2.$

This is lightning fast.

1  x: 1  y: 1  z: 1      a: 1  b: 0  c: 1  d: 1     1 + z^2 : 2 =  2
2  x: 1  y: 2  z: 2      a: 1  b: 0  c: 2  d: 1     1 + z^2 : 5 =  5
3  x: 1  y: 3  z: 3      a: 1  b: 0  c: 3  d: 1     1 + z^2 : 10 =  2 5
4  x: 1  y: 4  z: 4      a: 1  b: 0  c: 4  d: 1     1 + z^2 : 17 =  17
5  x: 1  y: 5  z: 5      a: 1  b: 0  c: 5  d: 1     1 + z^2 : 26 =  2 13
6  x: 1  y: 6  z: 6      a: 1  b: 0  c: 6  d: 1     1 + z^2 : 37 =  37
7  x: 1  y: 7  z: 7      a: 1  b: 0  c: 7  d: 1     1 + z^2 : 50 =  2 5^2
7  x: 5  y: 5  z: 7      a: 3  b: 1  c: 2  d: 1     1 + z^2 : 50 =  2 5^2
8  x: 1  y: 8  z: 8      a: 1  b: 0  c: 8  d: 1     1 + z^2 : 65 =  5 13
8  x: 7  y: 4  z: 8      a: 2  b: 1  c: 3  d: 2     1 + z^2 : 65 =  5 13
9  x: 1  y: 9  z: 9      a: 1  b: 0  c: 9  d: 1     1 + z^2 : 82 =  2 41
10  x: 1  y: 10  z: 10      a: 1  b: 0  c: 10  d: 1     1 + z^2 : 101 =  101
11  x: 1  y: 11  z: 11      a: 1  b: 0  c: 11  d: 1     1 + z^2 : 122 =  2 61
12  x: 1  y: 12  z: 12      a: 1  b: 0  c: 12  d: 1     1 + z^2 : 145 =  5 29
12  x: 9  y: 8  z: 12      a: 5  b: 2  c: 2  d: 1     1 + z^2 : 145 =  5 29
13  x: 1  y: 13  z: 13      a: 1  b: 0  c: 13  d: 1     1 + z^2 : 170 =  2 5 17
13  x: 7  y: 11  z: 13      a: 4  b: 1  c: 3  d: 1     1 + z^2 : 170 =  2 5 17
14  x: 1  y: 14  z: 14      a: 1  b: 0  c: 14  d: 1     1 + z^2 : 197 =  197
15  x: 1  y: 15  z: 15      a: 1  b: 0  c: 15  d: 1     1 + z^2 : 226 =  2 113
16  x: 1  y: 16  z: 16      a: 1  b: 0  c: 16  d: 1     1 + z^2 : 257 =  257
17  x: 11  y: 13  z: 17      a: 3  b: 1  c: 5  d: 2     1 + z^2 : 290 =  2 5 29
17  x: 1  y: 17  z: 17      a: 1  b: 0  c: 17  d: 1     1 + z^2 : 290 =  2 5 29
18  x: 15  y: 10  z: 18      a: 2  b: 1  c: 7  d: 4     1 + z^2 : 325 =  5^2 13
18  x: 17  y: 6  z: 18      a: 3  b: 2  c: 4  d: 3     1 + z^2 : 325 =  5^2 13
18  x: 1  y: 18  z: 18      a: 1  b: 0  c: 18  d: 1     1 + z^2 : 325 =  5^2 13
19  x: 1  y: 19  z: 19      a: 1  b: 0  c: 19  d: 1     1 + z^2 : 362 =  2 181
20  x: 1  y: 20  z: 20      a: 1  b: 0  c: 20  d: 1     1 + z^2 : 401 =  401
21  x: 1  y: 21  z: 21      a: 1  b: 0  c: 21  d: 1     1 + z^2 : 442 =  2 13 17
21  x: 9  y: 19  z: 21      a: 5  b: 1  c: 4  d: 1     1 + z^2 : 442 =  2 13 17
22  x: 17  y: 14  z: 22      a: 9  b: 4  c: 2  d: 1     1 + z^2 : 485 =  5 97
22  x: 1  y: 22  z: 22      a: 1  b: 0  c: 22  d: 1     1 + z^2 : 485 =  5 97
23  x: 13  y: 19  z: 23      a: 7  b: 2  c: 3  d: 1     1 + z^2 : 530 =  2 5 53
23  x: 1  y: 23  z: 23      a: 1  b: 0  c: 23  d: 1     1 + z^2 : 530 =  2 5 53
24  x: 1  y: 24  z: 24      a: 1  b: 0  c: 24  d: 1     1 + z^2 : 577 =  577
25  x: 1  y: 25  z: 25      a: 1  b: 0  c: 25  d: 1     1 + z^2 : 626 =  2 313
26  x: 1  y: 26  z: 26      a: 1  b: 0  c: 26  d: 1     1 + z^2 : 677 =  677
27  x: 17  y: 21  z: 27      a: 3  b: 1  c: 8  d: 3     1 + z^2 : 730 =  2 5 73
27  x: 1  y: 27  z: 27      a: 1  b: 0  c: 27  d: 1     1 + z^2 : 730 =  2 5 73
28  x: 1  y: 28  z: 28      a: 1  b: 0  c: 28  d: 1     1 + z^2 : 785 =  5 157
28  x: 23  y: 16  z: 28      a: 2  b: 1  c: 11  d: 6     1 + z^2 : 785 =  5 157
29  x: 1  y: 29  z: 29      a: 1  b: 0  c: 29  d: 1     1 + z^2 : 842 =  2 421
30  x: 15  y: 26  z: 30      a: 4  b: 1  c: 7  d: 2     1 + z^2 : 901 =  17 53
30  x: 1  y: 30  z: 30      a: 1  b: 0  c: 30  d: 1     1 + z^2 : 901 =  17 53
31  x: 11  y: 29  z: 31      a: 6  b: 1  c: 5  d: 1     1 + z^2 : 962 =  2 13 37
31  x: 1  y: 31  z: 31      a: 1  b: 0  c: 31  d: 1     1 + z^2 : 962 =  2 13 37
32  x: 1  y: 32  z: 32      a: 1  b: 0  c: 32  d: 1     1 + z^2 : 1025 =  5^2 41
32  x: 25  y: 20  z: 32      a: 13  b: 6  c: 2  d: 1     1 + z^2 : 1025 =  5^2 41
32  x: 31  y: 8  z: 32      a: 4  b: 3  c: 5  d: 4     1 + z^2 : 1025 =  5^2 41
33  x: 19  y: 27  z: 33      a: 10  b: 3  c: 3  d: 1     1 + z^2 : 1090 =  2 5 109
33  x: 1  y: 33  z: 33      a: 1  b: 0  c: 33  d: 1     1 + z^2 : 1090 =  2 5 109
34  x: 1  y: 34  z: 34      a: 1  b: 0  c: 34  d: 1     1 + z^2 : 1157 =  13 89
34  x: 31  y: 14  z: 34      a: 8  b: 5  c: 3  d: 2     1 + z^2 : 1157 =  13 89
35  x: 1  y: 35  z: 35      a: 1  b: 0  c: 35  d: 1     1 + z^2 : 1226 =  2 613
36  x: 1  y: 36  z: 36      a: 1  b: 0  c: 36  d: 1     1 + z^2 : 1297 =  1297
37  x: 1  y: 37  z: 37      a: 1  b: 0  c: 37  d: 1     1 + z^2 : 1370 =  2 5 137
37  x: 23  y: 29  z: 37      a: 3  b: 1  c: 11  d: 4     1 + z^2 : 1370 =  2 5 137
38  x: 17  y: 34  z: 38      a: 9  b: 2  c: 4  d: 1     1 + z^2 : 1445 =  5 17^2
38  x: 1  y: 38  z: 38      a: 1  b: 0  c: 38  d: 1     1 + z^2 : 1445 =  5 17^2
38  x: 31  y: 22  z: 38      a: 2  b: 1  c: 15  d: 8     1 + z^2 : 1445 =  5 17^2
39  x: 1  y: 39  z: 39      a: 1  b: 0  c: 39  d: 1     1 + z^2 : 1522 =  2 761
40  x: 1  y: 40  z: 40      a: 1  b: 0  c: 40  d: 1     1 + z^2 : 1601 =  1601
41  x: 1  y: 41  z: 41      a: 1  b: 0  c: 41  d: 1     1 + z^2 : 1682 =  2 29^2
41  x: 29  y: 29  z: 41      a: 5  b: 2  c: 7  d: 3     1 + z^2 : 1682 =  2 29^2
42  x: 1  y: 42  z: 42      a: 1  b: 0  c: 42  d: 1     1 + z^2 : 1765 =  5 353
42  x: 33  y: 26  z: 42      a: 17  b: 8  c: 2  d: 1     1 + z^2 : 1765 =  5 353
43  x: 13  y: 41  z: 43      a: 7  b: 1  c: 6  d: 1     1 + z^2 : 1850 =  2 5^2 37
43  x: 1  y: 43  z: 43      a: 1  b: 0  c: 43  d: 1     1 + z^2 : 1850 =  2 5^2 37
43  x: 25  y: 35  z: 43      a: 13  b: 4  c: 3  d: 1     1 + z^2 : 1850 =  2 5^2 37
44  x: 1  y: 44  z: 44      a: 1  b: 0  c: 44  d: 1     1 + z^2 : 1937 =  13 149
44  x: 41  y: 16  z: 44      a: 3  b: 2  c: 10  d: 7     1 + z^2 : 1937 =  13 149
45  x: 1  y: 45  z: 45      a: 1  b: 0  c: 45  d: 1     1 + z^2 : 2026 =  2 1013
46  x: 1  y: 46  z: 46      a: 1  b: 0  c: 46  d: 1     1 + z^2 : 2117 =  29 73
46  x: 31  y: 34  z: 46      a: 8  b: 3  c: 5  d: 2     1 + z^2 : 2117 =  29 73
47  x: 19  y: 43  z: 47      a: 5  b: 1  c: 9  d: 2     1 + z^2 : 2210 =  2 5 13 17
47  x: 1  y: 47  z: 47      a: 1  b: 0  c: 47  d: 1     1 + z^2 : 2210 =  2 5 13 17
47  x: 23  y: 41  z: 47      a: 4  b: 1  c: 11  d: 3     1 + z^2 : 2210 =  2 5 13 17
47  x: 29  y: 37  z: 47      a: 3  b: 1  c: 14  d: 5     1 + z^2 : 2210 =  2 5 13 17
48  x: 1  y: 48  z: 48      a: 1  b: 0  c: 48  d: 1     1 + z^2 : 2305 =  5 461
48  x: 39  y: 28  z: 48      a: 2  b: 1  c: 19  d: 10     1 + z^2 : 2305 =  5 461
49  x: 1  y: 49  z: 49      a: 1  b: 0  c: 49  d: 1     1 + z^2 : 2402 =  2 1201
50  x: 1  y: 50  z: 50      a: 1  b: 0  c: 50  d: 1     1 + z^2 : 2501 =  41 61
50  x: 49  y: 10  z: 50      a: 5  b: 4  c: 6  d: 5     1 + z^2 : 2501 =  41 61

It is also easy enough to find all rational solutions by stereographic projection around a given rational solution.

Will Jagy
  • 146,052
0

I was brought to this question by a duplicate, which asked for odd solutions. This answer finds the general solution, but gives conditions on the parameters to get all possible parities for the triples as well as for eliminating duplicates.


General Solution

We will rewrite $$ x^2+y^2=z^2+1\tag1 $$ as $$ x^2-1=z^2-y^2\tag2 $$ For $n-m\gt2$ so that $2\mid n-m$ and $$ nm=x^2-1\tag3 $$ let $$ \begin{align} y&=\frac{n-m}2\tag{4a}\\ z&=\frac{n+m}2\tag{4b} \end{align} $$ Given a positive integer $x$, for any factorization from $(3)$, $(4)$ will give a solution to $(1)$. Some will be duplicates of others and we can get mixtures of even and odd numbers for $x$ and $y$.


Possible Parities

Case $\bf{1}$: $\mathbf{x,y}$ both odd
If $x$ is odd, then $8\mid nm=x^2-1$. Since $2\mid n-m$, both $n$ and $m$ must be even. If $y$ is odd, $\text{(4a)}$ says $\frac n2-\frac m2$ is odd; thus, one of $\frac n2$ or $\frac m2$ must be odd and the other must be even. That is, $$ (n,m,4)=2\tag5 $$ Case $\bf{2}$: $\mathbf{x}$ odd, $\mathbf{y}$ even
If $x$ is odd, then $8\mid nm=x^2-1$. Since $2\mid n-m$, both $n$ and $m$ must be even. If $y$ is even, $\text{(4a)}$ says $\frac n2-\frac m2$ is even. If both $\frac n2$ and $\frac m2$ were odd, then $8$ would not divide $nm$. Thus, both $\frac n2$ and $\frac m2$ must be even. That is, $$ (n,m,4)=4\tag6 $$ Furthermore, since $4$ divides both $n$ and $m$, $x^2=nm+1\equiv1\pmod{16}$, which has solutions $$ x\in\{1,7\}\pmod8\tag7 $$ so not every odd $x$ can be paired with an even $y$.

Case $\bf{3}$: $\mathbf{x}$ even, $\mathbf{y}$ odd
If $x$ is even, $nm=x^2-1$ is odd, and therefore, both $n$ and $m$ must be odd. Furthermore, $x^2-1\equiv3\pmod4$; thus, one of $n$ or $m$ must be $1\bmod4$ and the other must be $3\bmod4$. Therefore, $$ y=\frac{n-m}2\equiv1\pmod2\tag8 $$ and $$ z=\frac{n+m}2\equiv0\pmod2\tag9 $$ That is, regardless of the factorization from $(3)$, $(4)$ will give an odd $y$ and even $z$.

Case $\bf{4}$: $\mathbf{x,y}$ both even
In the previous section, it was shown that if $x$ is even, $y$ is forced to be odd. Indeed, $x$ and $y$ cannot both be even since then $x^2+y^2\equiv0\pmod4$, whereas $z^2+1\in\{1,2\}\pmod4$.


Eliminating Duplicates

In Case $1$, both $x$ and $y$ are odd, so there are triples where $x\lt y$ and triples where $y\lt x$ that will be duplicates. For example, $$ \begin{array}{ccc} x&y&z&n&m\\\hline 11&7&13&20&6\\ 7&11&13&24&2\\ \end{array} $$ Furthermore, there are triples from Case $2$ and Case $3$ that coincide. For example, $$ \begin{array}{ccc} x&y&z&n&m\\\hline 7&4&8&12&4\\ 4&7&8&15&1\\ \end{array} $$ We don't need to worry about Case $4$.

We can eliminate the duplicates from the Case $2$ and Case $3$ overlap by using only one of them, as that will generate all of the odd/even examples. However, Case $1$ duplicates are not so easy to eliminate.

We can eliminate the Case $1$ duplicates, and even the Case $2$ and Case $3$ overlap if we wish, using the following

Lemma: Given that $n\gt m$, $$ n\gt\left(3+2\sqrt2\right)m\iff y\ge x\tag{10} $$ Proof: $$ \begin{align} n\gt\left(3+2\sqrt2\right)m&\iff n^2-6nm+m^2\gt0\tag{10a}\\ &\implies n^2-6nm+m^2+4n-4m\gt0\tag{10b}\\ &\iff (y+1)^2\gt x^2\tag{10c}\\ &\iff y^2\ge x^2\tag{10d}\\ &\iff n^2-6mn+m^2-4\ge0\tag{10e}\\ &\implies n^2-6nm+m^2\gt0\tag{10f}\\ &\iff n\gt\left(3+2\sqrt2\right)m\tag{10g} \end{align}\\ $$ Explanation:
$\text{(10a)}$: $3+2\sqrt2$ and its reciprocal are roots of $x^2-6x+1$
$\phantom{\text{(10a):}}$ so $n\gt m$ means $n^2-6nm+m^2\gt0\iff n\gt\left(3+2\sqrt2\right)m$
$\text{(10b)}$: $n-m\gt0$
$\text{(10c)}$: apply $(3)$ and $(4)$
$\text{(10d)}$: $x,y\in\mathbb{Z}$
$\text{(10e)}$: apply $(3)$ and $(4)$
$\text{(10f)}$: $4\gt0$
$\text{(10g)}$: same as $\text{(10a)}$

Therefore, if we use only the pairs $n,m$ so that $n\gt\left(3+2\sqrt2\right)m$, we will only get the triples where $x\le y$, thus eliminating the duplicates.

robjohn
  • 353,833