Given $p,q\in\mathbb Z^+$, and a vector $v=(x\_1,\dots,x\_{p+q})$ we consider the function $\chi(v)$:


$$\chi(v)=x\_1^2+\dots+x\_p^2-x\_{p+1}^2-\dots-x\_{p+q}^2$$


We wish to find solutions to $\chi(v)=0$ for all $p,q$ with the condition that $x\_i\in\mathbb Z^+$. This has no solutions if $p=0$ or $q=0$.


I have found the earliest solutions for $p+q=50$ where valid [here](https://oeis.org/A215056).


There are two questions:


1. For any $p\ne0\land q\ne0$ are there solutions?
2. Is there a simple method to find solutions for any valid $p,q$?



Finding integer zeroes for a particular family of equations
Here is an easy argument, answering affirmatively both questions. I have interpreted the slightly ambiguous wording as meaning that for each choice of $p,q$, with both positive (which means *strictly* positive), there exists a solution with all entries (strictly) positive. 


Lemma. Given $q \geq 1$, there exists
a tuple of positive integers, $(a; b\_1, b\_2, \dots, b\_q)$ such that $a $ is odd and $a^2 = \sum b\_i^2$.


Proof. By induction. If $q = 1$, set $a = b\_1 =1$. Otherwise
assume true for $q-1$; there exists a strictly positive tuple, $(r; b\_1,
b\_2, \dots, b\_{q-1}) $, such that $r^2 = \sum\_{i=1}^{q-1} b\_i^2$ with odd $r > 1
$. Then we can write $r^2 = ((r^2+1)/2)^2 - ((r^2 -1)/2)^2 =e^2 -f^2$, as a difference of square integers, with $e$ odd, and $f$ even but nonzero. Set $a =
e$ (so $a$ is odd) and $b\_q = f$. Then
$$\eqalign{
a^2 - \sum\_1^q b\_i^2 &= \left(r^2 - \sum\_{i=1}^{q-1} b\_i^2\right) + a^2 - r^2
- b\_q^2\cr
& = 0 + 0 = 0.\cr
}$$


[Hypothesis about oddness is needed for the differences of squares argument.]


Corollary. If $p, q$ are positive integers, there exists a strictly
positive integer solution $(x\_1, \dots, x\_p; y\_1, \dots y\_q) $ to the
equation
$$
\sum\_{j=1}^p x\_j^2 = \sum\_{i=1}^q y\_i^2.
$$


Proof. Without loss of generality, $p \leq q$. If $p= q$, set all the
variables equal to $1$. Otherwise, $p < q$; by setting $x\_1 = x\_2 = \dots=
x\_{p-1} = 1 = y\_1 = y\_2 = \dots = y\_{p-1}$, we immediately reduce to the
case that $p = 1$ and $q > 1$. But this is the conclusion of the lemma.


Presumably, by actually applying the induction argument with the smallest possible choices for $r$, one obtains small (or even the smallest) solutions (where we measure smallness by the sum)?


The problem would be more difficult if all the entries of the solution were required to be distinct as well.


