4

For a small project I am working on, I wish to find the solutions for $$x^2+y^2=z(4z+1)$$ in natural numbers $x,y,z$. I wish to automate finding solutions for $z$ up to a maximum value as efficient as possible, running through $z$ values from 1 and then try to find possible $x$ and $y$.

One thing that I found is that I can disregard $z \equiv 3,6,7 \mod 8$, as the sum of two squares can only be $\equiv 0,1,2,4,5 \mod 8$. But I wonder which other criteria I can use to exclude $z$ values. I also wonder whether for given $z$, which $x$ I can ignore, so that I only test those $x$ values that could give a solution.

Maestro13
  • 2,090

3 Answers3

2

For the solution of the equation. $$X^2+Y^2=Z(4Z+1)$$

You must use the solutions of the equation. $$k^2+t^2=4s^2+1$$

You can use solutions which are recorded in the subject. Integral solutions of hyperboloid $x^2+y^2-z^2=1$

Then using the solutions of this equation can be substituted into the formula and find us.

$$X=k^2+4s^2-t^2+(4t+9s)k$$

$$Y=2t^2+8s^2-2k^2+(2k+9s)t$$

$$Z=k^2+t^2+5s^2+2(2t+k)s$$

individ
  • 4,405
  • 1
    ~individ Nice but two questions: (1) how did you derive these formulas (2) will this get all solutions? – Maestro13 Apr 05 '17 at 17:35
1

The numbers that are a sum of two squares are exactly the ones of this form: $$2^rp_1\ldots p_s m^2$$ where $r$ and $s$ are non negative integers, $m$ is natural and $p_1,\ldots,p_s$ are primes congruent to $1$ mod $4$ (not necessarily different).

Since $z$ and $4z+1$ are coprime, the number $z(4z+1)$ is a sum of two squares if and only if both $z$ and $4z+1$ are sums of squares.

ajotatxe
  • 66,849
1

Not the answer but

$${{x}^{2}}+{{y}^{2}}=z\,\left( 4z+1\right)$$

$$x=\frac{2{{s}^{2}}-2{{h}^{2}}-h}{4h+1},\ y=s,\ z=\frac{{{s}^{2}}+{{h}^{2}}}{4h+1}$$

AlexSam
  • 311
  • 1
  • 2
  • 8