Find all solutions the diophantine equation $x^2+y^2=z^2+w^2+1$ 
Let $x,y,z,w$ be postive integers,find the diophantine equation all solution
  $$x^2+y^2=z^2+w^2+1$$

However,  I'm looking for a identity or something like that. Very important is that must be a general solution, it must contain all the odds with all the possible numbers.
 A: Catalan gave the following complete integer solution of the 2.2.3 equation $$X_1^2+X_2^2=Y_1^2+Y_2^2+Y_3^2. \tag{1}$$

Choose relatively prime integers $\alpha$ and $\beta$, and integers $u$ and $v$ such that $\beta u - \alpha v = 1$. Then all integer solutions of (1) are given, without repetition, by the formulas
  \begin{align*}
 x_1 &= \tfrac{1}{2}(\alpha^2 + \beta^2 + y_3^2)u + \beta \theta,  &
  y_1 &= x_1 + \alpha,  \\
 x_2 &= \tfrac{1}{2}(\alpha^2 + \beta^2 + y_3^2)v + \alpha \theta,  &
  y_2 &= x_2 - \beta,
\end{align*}
  where $\theta$ is an arbitrary integer.

[cf. Dickson’s History, Vol II, p. 268; orig: Assoc franç., av. sc. 12, 1883, 98–101]
Your question is one of the special cases $y_1^2=1$ or $y_2^2=1$ or $y_3^2=1$.
Another avenue would be to note that there is a parameterization for every equal sums of squares equation
$$
X_1^2 + \dotsb + X_m^2 = Y_1^2 + \dotsb + Y_n^2
$$
with $n,m$ positive integers and all $X_i,Y_i$ integers; your special case is $(m,n)=(2,3)$, with the addition restriction(s) on the $y_i$. The papers by Barnett and Bradley are my first recommendations — they offer parameterizations which you can use as a starting point for your special case(s).
A: Already the special case $w=0$ has a complicated theory concerning its solutions, see this MO-question, involving rational quadratic forms, or an identity
$$
(289p^4+14p^2q^2−239q^4)^2−(17p^2−12pq−13q^2)^4−(17p^2+12pq−13q^2)^4=−1,
$$
with $q^2-17p^2=-1$. So it seems that this is not a reasonable "test problem", to ask for a description of all integral solutions.
Concerning identities we have (as mentioned above)
$$
(7n+3)^2+(4n+3)^2=(n+1)^2+(4(2n+1))^2+1,
$$
which give infinitely many positive integer solutions, but not all.
A: $$x^2+y^2=z^2+w^2+1$$
Write solutions like this.
$$x=\frac{t}{2}((k-p)(k+p+2)+1)+p+1$$
$$y=tk^2-tp(p-1)+2p-1$$
$$z=\frac{t}{2}((k-p)(k+p-2)-1)+p-1$$
$$w=tk(k+1)-tp^2+2p$$
A: You are looking for $n$ and $n+1$ which are sums of two positive integer
squares. The sums of two integer squares are well-known. They are
the numbers of the form $a^2b$ where $b$ has no prime factors $p$
with $p\equiv3\pmod 4$. If you are strict about positive integers
then you have to eliminate squares $c^2$ where none of $c$'s prime
factors is $\equiv3\pmod 4$. You are then looking for consecutive
numbers of this form. It's difficult to provide a general procedure
for getting these, as the prime factors of $n$ and $n+1$ are "unrelated".
