In ℕ⁺, can the sum of three squares equal the sum of two squares? Are there any examples where:
$a² + b² + c² = p² + q²\qquad {a, b, c, p, q ∈ ℕ⁺}\tag{1}$
If not, can $(1)$ be disproven?
 A: Any prime $w \equiv 1 \pmod 8$ can be written as both $p^2 + q^2$ and $a^2 + 2 b^2$ with everything nonzero. So, $$ 17 = 3^2 + 2^2 + 2^2 = 1^2 + 4^2,   $$
$$  41 = 3^2 + 4^2 + 4^2 = 5^2 + 4^2 $$
$$  73 = 1^2 + 6^2 + 6^2 = 8^2 + 3^2 $$
A: For the equation:
$$X_1^2+X_2^2=Y_1^2+Y_2^2+Y_3^2$$
Solutions have the form:
$$X_1=t^2+2(p+s-k)t+2k^2+2p^2+4ps-4pk-2sk$$
$$X_2=t^2+2(p+s-k)t+2k^2+2s^2+4ps-2pk-4sk$$
$$Y_1=t^2+2(p+s-k)t+2k^2+2ps-2pk-2sk$$
$$Y_2=t^2+2(p+s-k)t+2ps$$
$$Y_3=2(p+s-k)(t+p+s-k)$$
A: One need only to pick out 3 distinct naturals, with the only constraint that they aren't all even:
Suppose you pick $(p,q,r) \in \mathbb N^3, \ \ \ $ let $r \gt q \ \land \  r\gt p ,\ \ $ then there exists a natural number $N \not \equiv 2 \pmod 4 $, which can be converted to a difference of two squares in at least one way, such that:
$$p^2+r^2=q^2+N \qquad | \qquad N=d_1 \cdot d_2, \quad N \not \equiv 2 \pmod 4 $$
And then converting $N$ to a difference of two squares using the identity below:
$N=\alpha^2-\beta^2 \quad | \quad (\alpha,\beta) \in \mathbb N^2\implies$
$$p^2+r^2+\beta^2=q^2+\alpha^2$$
Note that, to allow that $N \not \equiv 2 \pmod 4, \ \ $if you chose only one even, it needs to go on the L.H.S., but if you choose two they can be placed in any position.
Ex:  Pick $(1,2,5). \ \ $  Then we have $2^2+5^2=1^2+N \quad | \quad N=28=14\cdot 2=8^2-6^2 \ \implies$
$$2^2+5^2+6^2=1^2+8^2$$

Suppose you don't want to pick three numbers repeatedly, then you can pick one well-chosen pell equation:
For nonsquare integers $C$ and $D$, if you take any pell-type equation of the form:
$$x^2-Dy^2=C \qquad | \qquad C \not \equiv 2 \pmod 4  \quad \land \quad D \not \equiv 2 \pmod 4$$
then it can be converted into a sum of three squares equaling a sum of two squares.  You only need to rewrite $C$ and $D$ as a difference of two squares:
$$C=\beta^2-\alpha^2, \quad D=\gamma^2-\delta^2 \quad \implies$$
$$\alpha^2+x^2+(\delta y)^2=\beta^2+(\gamma y)^2$$
That you can always find $\alpha, \beta, \gamma, \delta$ that works is evident from:


*

*The identity $$N=d_1\cdot d_2=\left(\frac{d_1+d_2}{2}\right)^2-\left(\frac{d_1-d_2}{2}\right)^2$$

*The constraint that $C$ and $D$ are not $ 2 \pmod 4$.  Note that if they are, you need only to multiply the pell type equation by $4$, producing $(2x)^2+Ey^2=F$, and using the above identity, and 

*All natural numbers have at least 2 divisors.  And all natural numbers that are not $ 2 \pmod 4$ have at least 2 divisors of the same parity, so that their sum or difference is even and you can divide by 2.


Thus for each solvable pell-type equation of the above form, there are an infinity of associated "five-tuplets" which meet the question.
Example:  $x^2-13y^2=3 \quad \to \quad x^2-(7^2-6^2)y^2=2^2-1^2 \quad \implies$
$$1^2+x^2+(6y)^2=2^2+(7y)^2$$ 
With the first two solutions $(4,1)$ and , well $(256,71)$ (!) we have
$$1^2+4^2+6^2=2^2+7^2$$
$$1^2+256^2+426^2=2^2+497^2$$ 
