# Finding solutions to $(4x^2+1)(4y^2+1) = (4z^2+1)$

Consider the following equation with integral, nonzero $x,y,z$

$$(4x^2+1)(4y^2+1) = (4z^2+1)$$

What are some general strategies to find solutions to this Diophantine?

If it helps, this can also be rewritten as $z^2 = x^2(4y^2+1) + y^2$

I've already looked at On the equation $(a^2+1)(b^2+1)=c^2+1$

-
– Martin Sleziak Jun 25 '12 at 14:31
Are there general methods? – MyNameIsKhan Jun 25 '12 at 15:34
You say you have looked at that earlier question. Have you looked at the Kashihara paper cited there? What did it tell you about the question you are asking? – Gerry Myerson Jun 26 '12 at 5:19
@GerryMyerson I looked through the paper but had a hard time understanding it. I couldn't find any section that simply outlined how to find solutions. It looked like more of a proof with a lot of notation I didn't understand, and I couldn't find a single page that gave me something I could work with. – MyNameIsKhan Jun 26 '12 at 13:05

Let $a$ be a positive integer.
Then

\begin{align} (4a^2+1)(4((2a)^2)^2+1) &= 256a^6 + 64a^2 + 4a^2 + 1 \\ & = 4(64a^6 + 16a^4 + a^2) + 1 \\ &= 4(a^2(8a^2+1)^2)+1 \\ &= 4((8a^2+1)a)^2+1 \end{align}

so $(a, (2a)^2, (8a^2+1)a)$ is always a solution.

There are others as well.

-
How do you find the others? What method is this? – MyNameIsKhan Jun 25 '12 at 18:08
I found the first ones by writing program code and noticing the pattern, and then doing the algebra to confirm it. But I also found other solutions which I haven't spotted a pattern for yet. – Peter Phipps Jun 25 '12 at 18:15
I like (+1) brute force work combined with mathematical intuition... – draks ... Jun 25 '12 at 21:00

Here is one general approach. Since the product of the sum of two squares is itself the sum of two squares, then,

$$\tag{1}(4x^2+1)(4y^2+1) = 4z^2+1$$

is equivalent to,

$$\tag{2}(2x+2y)^2+(4xy-1)^2 = 4z^2+1$$

The complete solution to the form,

$$\tag{3}x_1^2+x_2^2 = y_1^2+y_2^2$$

is given by the identity,

$$\tag{4}(ac+bd)^2 + (bc-ad)^2 = (ac-bd)^2+(bc+ad)^2$$

One can then equate the terms of (2) and (4), solve for {x, y, z}, with {a, b, c, d} chosen such that one term on the RHS is equal to unity.

EDITED MUCH LATER:

In response to your questions, let's have a simpler solution to (3) as,

$$\tag{5}(6n+2)^2+(6n^2+4n-1)^2=(6n^2+4n+2)^2+1$$

Equate the terms of (2) and (5) and we find that,

$$x = \frac{1}{2}\big(1+3n-\sqrt{3n^2+2n+1}\big)$$

$$y = \frac{1}{2}\big(1+3n+\sqrt{3n^2+2n+1}\big)$$

$$z = (6n^2+4n+2)/2$$

To get rid of the $\sqrt{N}$ and solve the form,

$$an^2+bn+c^2 = \square$$

one simply chooses,

$$n = \frac{-2cuv+bv^2}{u^2-av^2}$$

for arbitrary {u, v}. Of course, since you want integer n, you have to solve the denominator as the Pell equation $u^2-av^2 = \pm 1$.

In summary, and after simplification, an infinite number of integer solutions to,

$$(4x^2+1)(4y^2+1) = 4z^2+1$$

is given by the rather simple,

$$x = (u-3v)(u-v)$$

$$y = 2uv$$

$$z = (u^2-2uv+3v^2)^2$$

where,

$$u^2-3v^2=1$$

P.S. It is quite easy to find other solutions similar to (5), and appropriate ones would need other Pell equations.

-
Is it right, that one could exclude cases, where $4z^2+1$ is prime due to Thue's Lemma: A prime $p=4k+1\;$ has a unique representation $p=a^2+b^2$ with $0<a<b\;$? – draks ... Jun 25 '12 at 20:07
To be honest I don't understand this answer. Are you saying (bc+ad)^2 = 1? I don't know where the p's and q's are coming from – MyNameIsKhan Jun 25 '12 at 20:13
@AgainstASicilian, I think he's saying that $ac-bd$, like $5\cdot 1 - 2\cdot 1$. Then you get the other terms in $(4)$, resp. $(3)$ and so forth. +1 nice answer. – draks ... Jun 25 '12 at 20:44
@draks I understand that ac-bd is ac-bd. I don't understand though what he means about "unity" nor do I know what he means about solving for x and y through the LHS. If I equate the LHS of (2) and (5) in Wolfram, it's a mess. – MyNameIsKhan Jun 25 '12 at 20:49
@AgainstASicilian 1. one term on the RHS is equal to unity: Choose $ac-bd=1$. 2. Set $p^2q+p-q=2x+2y$ and asked Wolfram again and even get some examples. – draks ... Jun 25 '12 at 20:58