Quadratic Diophantine Equations I note that the Diophantine equation, $x^2 + y^2 = z^2$, with $x, y, z \in \mathbb{N}$, has infinitely many solutions. Indeed, $(x, y, z) = (3,4,5)$ provides a solution, and for any $k \in \mathbb{N}$ : $(kx, ky, kz ) = (3k, 4k, 5k)$ provides a solution.
However, assuming $x, y, z \in \mathbb{N}$ with $x, y > 1$, is the same true for the Diophantine equations, 
$x^2 +y^2 = z^2 + 1$, 
$x^2 + y^2 = z^2 + 2$,
$x^2 + y^2 = z^2 + 3$
and more generally, for $x^2 + y^2 = z^2 + n$, for any $n \in \mathbb{N}$?
In particular, are there infinitely-many triples $(x, y, z) \in \mathbb{N}^3$ for which  $x^2 + y^2 = z^2  + n$ is true for infinitely-many values of $n \in \mathbb{N}$?
 A: $x^2+y^2 = z^2+n$ is equivalent to $x^2-n = (z-y)(z+y)$.
Any composite odd number can be written as $(z-y)(z+y)$ for some integers $z$ and $y$, so it is enough to show that $x^2-n$ contains infinitely many composite odd numbers.
If $n$ is odd, then you can simply pick $x = 2kn$ for any $k$. Then $x^2-n$ is a multiple of $n$ and odd, which gives you two integers $y$ and $z$ satisfying the equation. You end up with the family of solutions $(2kn, 2k^2n-(n+1)/2, 2k^2n-(n-1)/2)$
If $n$ is even, then you can simply pick $x=2k(n-1)+1$ for any $k$. Then $x^2-n \equiv 1^2-1 = 0 \pmod {n-1}$, and it is odd so again this gives you two integers $y$ and $z$ satisfying the equation. You end up with the family of solutions $(2k(n-1)+1,2k^2(n-1)+2k-n/2,2k^2(n-1)+2k-1+n/2)$
A: EDIT: I can't quite parse the final question in the original post. However, given any integer $N,$ there are infinitely many triples $(x,y,z)$ that solve
$$ x^2 + y^2 - z^2 = N^2  $$ using the process below. A "seed" triple may be taken with any $x=z, \; y = N.$ If we just take $\gcd(x,N) = 1$ as well, we get primitive triples. 
ORIGINAL:Actually, the group of automorphs of $x^2 + y^2 - z^2$ is known. It is infinite, and generated by three matrices, along with negating any of $x,y,z$ if that is necessary, not sure. I am trying to find a question that shows the matrices, no luck so far. However, what is means is that, if there is a single solution to $x^2 + y^2 = z^2 + k$ for some integer $k,$ positive or negative or zero, then there are infinitely many, and we can travel among them by matrix multiplication of the column vectors $(x,y,z)^T.$
I think it was some question here or on MO more likely, about the structure of Pythagorean triples. Note that the expert on this is named Ian Agol. There is just a comment by him at this one:
https://mathoverflow.net/questions/33697/assistance-with-understanding-parent-child-relationships-in-pythagorean-triples 
Here we go, http://en.wikipedia.org/wiki/Tree_of_Pythagorean_triples
these matrices due to F. J. M.  Barning (1963)
$$  A = \;
 \left(  \begin{array}{rrr}
  1 & -2 & 2    \\
  2 & -1 & 2 \\
   2 & -2 & 3
\end{array} 
  \right)  
\; \; B = \; 
 \left(  \begin{array}{rrr}
  1 & 2 & 2    \\
  2 & 1 & 2 \\
   2 & 2 & 3
\end{array} 
  \right)  
\; \; C = \; 
 \left(  \begin{array}{rrr}
    -1 & 2 & 2    \\
  -2 & 1 & 2 \\
   -2 & 2 & 3  
\end{array} 
  \right) 
  $$
A: For the special case when the number of is a square and is given us.
That is, in the equation:
$X^2+Y^2=Z^2+q^2$
where the number of $q$ - given us.
Then the solutions of the equation can be written ospolzovavshis Pell: $p^2-2k(k-1)s^2=\pm{q}$
$k$ - given us can be anything.
$X=p^2+2(k-1)ps+2k(k-1)s^2$
$Y=p^2+2kps+2k(k-1)s^2$
$Z=p^2+2(2k-1)ps+2k(k-1)s^2$
If we use the solutions of Pell's equation: $p^2-2s^2=\pm1$
Solutions have the form:
$X=sp^2+2qps\pm(qp^2+2(p+q)s^2)$
$Y=2qps+2s^3\pm(qp^2+2(p+q)s^2)$
$Z=sp^2+4qps+2s^2\pm(qp^2+2(p+q)s^2)$
A: I think the answer to your question is no. There may be infinitely many solutions to the diophantine equations you have stated, however you cannot classify them as in the $x^2+y^2=z^2$ case. What I mean is that in the equations $x^2+y^2=z^2+n$, if you have a solution $(x_1,y_1,z_1)$, you cannot generalize this solution as to $(kx_1,ky_1,kz_1)$, since you have the factor n.
For instance let us say we have the equation $x^2+y^2=z^2+12$. (5,6,7) is a solution of this equation, however when you plugin the values (10,12,14) the quation does not hold. So what I am saying is that you cannot find infinitely many solutions to the diaphontine equations $x^2+y^2=z^2+n$ with the same method you have applied in the phytogaros equation. Nevertheless, you may find infinitely many solutions using other parametrizations. Hope this helps you!
