8 Answers
8

Sierpsinski proved that whenever this diophantine equation does not have a solution for $x$ then $x^2+(x+1)^2$ is prime. It is conjectured also by Sierpinski that there are infinitely many primes of the above form but this still remains open.

I think this only answers a much stronger question. In particular, one can give a parametrization of solutions without necessarily having a characterization of which $x$ coordinates are hit.
–
S. Carnahan♦Sep 24 '13 at 15:30

@S.Carnahan yes ,but the ''parametrization'' may not actually give all integer triplets in a away similar to Euclidean triplets
–
Konstantinos GaitanasSep 24 '13 at 16:09

If one is interested in efficient algorithms, as opposed to the simple existence of algorithms, it may be worth noting that, given positive integers $a$, $b$, and $c$, the question, are there positive integers $x$ and $y$ such that $ax^2+by=c$, is NP-complete. This is item AN8 in Garey and Johnson, page 250; the citation is Manders and Adleman, NP-complete decision problems for binary quadratics, J Comput System Sci 16 (1978) 168-184.

Let me just add that for solving quadratic diophantine equations in 2 variables, i.e. equations of the form
$$
ax^2 + bxy + cy^2 + dx + ey + f = 0, \ \ a, b, c, d, e, f \in \mathbb{Z},
$$
there is a nice algorithm. Dario Alpern has created a website running a Java program which completely solves such equations for given coefficients $a, b, c, d, e$ and $f$ -- see
http://www.alpertron.com.ar/JQUAD.HTM. Optionally, the program shows all steps of the solution, similar as a human might do when solving the equation by hand.
The website also describes the algorithm used.

There are infinitely many integer solutions, so you need to specify what you mean by "can one find all". If you mean "Are all solutions given by a finite set of easily computed parametrized families?" then the answer is yes, essentially following John R Ramsden's answer (with some minor corrections).

If we set $X = 2x+1$, $Y = 2y+1$ and $Z = 2z+1$, we get the equation $X^2 + 1 = Y^2 + Z^2$. Euler showed that all solutions have the form $(ac+bd)^2 + 1 = (ac-bd)^2 + (ad+bc)^2$ where $a,b,c,d$ range over integers satisfying $ad-bc = 1$. This set is easy to parametrize, because $a,b,c,d$ describe entries of elements $\binom{ab}{cd}$ in $SL_2(\mathbb{Z})$. We are seeking odd solutions, and this condition is equivalent to $ac+bd$ odd, which can be determined by reducing matrices mod 2.

We find that any element of $SL_2(\mathbb{Z})$ congruent to $\binom{11}{01}$, $\binom{01}{11}$, $\binom{10}{11}$, or $\binom{11}{10}$ modulo 2 yields a solution to your equation. These can be easily generated, either by using the Euclidean algorithm to generate suitable elements of $SL_2(\mathbb{Z})$ from an initial choice of coprime integers, or by multiplying an initial solution by powers of the matrices $\binom{12}{01}$ and $\binom{10}{21}$. The kernel $\Gamma(2)$ of reduction mod 2 in $SL_2(\mathbb{Z})$ becomes a free group generated by those two matrices, once we quotient by $\pm \binom{10}{01}$. This sign ambiguity nicely cancels the invariance under sign change in Euler's parametrization.

S. Carnahan (Sep 24 '13 at 18:33) showed parametrization by cosets of congruence subgroups
of SL(2,Z). What is missing is parametrization of SL(2,Z) and its congruence subgroups which can be found in
L.N. Vaserstei. Polynomial parametrization for the solutions of Diophantine equations and
arithmetic groups , Annals of Math. 171:2 (March of 2010), 979–1009.
MR2630059. Zbl 05712747

Actually, the answer is the same as for the equation x^2 + y^2 = z^2 : the integer solutions cannot be covered by a polynomial solution with integer coefficients but can be covered by 2 polynomial solutions.
–
Leon VasersteinMar 24 at 3:07

We first run the algorithm to determine whether any solutions exist, by dovetailing an enumeration of integer $n$-tuples together with an exhaustive search of solutions modulo prime powers, halting if it finds either an integer solution, a disproof in modular arithmetic or a disproof in the reals (e.g. by showing that the quadratic form is positive- or negative-definite). This algorithm works by the Hasse principle.

If it finds a disproof, output the empty set $\emptyset$. Otherwise, we analyse the signature of the quadratic form. If it is $+++ ... +$ or $--- ... -$, then the surface would be bounded and, as such, there is a finite solution set that can be produced by exhaustive search. Otherwise, there are infinitely many solutions (as intersecting one solution with an appropriately-chosen plane yields a generalised Pell equation). In that case, we can just exhaustively run through an enumeration of integer $n$-tuples, printing out each solution that it finds.

But if there are infinitely many solutions, can we parametrize them somehow?
–
amateurSep 23 '13 at 10:18

The Hasse principle works rationally: your quadratic form has rational zeroes if and only if it has real zeroes and zeroes in $\mathbb{Q}_p$ for all $p$ (and the latter is fairly close to having solutions mod every prime power). However, in general there's a big gap between rational solutions and integer solutions, particularly as the OP's example of interest isn't homogenous.
–
James CranchSep 23 '13 at 14:28

James is correct; I missed the word 'homogeneous' when quickly reading an e-mail containing necessary and sufficient conditions for the Hasse principle to give an algorithmic criterion for whether integer solutions exist.
–
Adam P. GoucherSep 23 '13 at 22:27