(Non?)-uniqueness of sums of squares (I've had almost no exposure to number theory, so please keep answers as elementary as possible.)
Write $\mathbb{N} = \{0,1,2,3,\ldots\}$ for the natural numbers. Then every element of $\mathbb{N}$ can be expressed as a sum of squares. For example:
$$6 = 1+1+1+1+1+1$$
Usually, we can get away with fewer terms in our sum. For instance, in the preceeding example, we can get down from 6 terms to 3 by writing $6 = 4+1+1.$ So by the potency of $n \in \mathbb{N}$, let us mean the least $k \in \mathbb{N}$ such that $n$ can be expressed as a sum of $k$-many squares. Hence the potency of $6$ is $3.$

Question. Let $n \in \mathbb{N}$ denote a natural number with potency $k$. Suppose $x$ and $y$ are sequences of length $k$ in
  $\mathbb{N}$ such that $$n=\sum_{j = 1}^k x_j^2 = \sum_{j = 1}^k y_j^2.$$
Are the sequences $x$ and $y$ necessarily equal up to a reordering of their terms?

I'm guesssing not, but haven't been able to find a counterexample.
Further information.


*

*If $n$ is a prime of potency $2$, then the sequences $x$ and $y$ are equal up to reordering; see here.

*Here we learn that the corresponding statement for higher powers is false, since $1^3+5^3+5^3=2^3+3^3+6^3.$
 A: To expand on some of the other comments:
Any number can be written as a sum of $4$ squares. In fact, the number of ways to write the number $n$ as a sum of $4$ squares (more precisely, the number of tuples $(x,y,z,w)\in \mathbb{Z}^4$ with $x^2 + y^2 + z^2 + w^2 = n$) is $$8\sum_{d\mid n,\, 4\not\mid d}d$$ (I don't know of a nice reference for this fact, nor a proof that does not use modular forms unfortunately).
Now note that these numbers tend to be much larger than they would be if all such ways were rearrangements of each other (the above sum tends to grow with $n$, and there are infinitely many numbers which are not the sum of $3$ squares).
A: There are many counterexamples, of which the smallest is $$5^2 + 5^2 = 7^2 + 1^2.$$
(I earlier stated that $25$ was the smallest counterexample, since $3^2+4^2 = 0^2+5^2$, but in your terminology, it has a potency of 1, not 2, so it is not a counterexample.)
Brahmagupta's identity shows that if $x$ and $y$ are each expressible as a sum of two squares, then $xy$ is (almost always) expressible as a sum of two squares in more than one way, because $$\begin{align}
(a^2 + b^2)(c^2 + d^2) & =
  (ac-bd)^2 + (ad+bc)^2 \\
&= (ac+bd)^2 + (ad-bc)^2
\end{align}$$
The counterexample of $50$ I gave above illustrates this, since $50 = 5\cdot 10 = (1^2+2^2)(1^2+3^2)$; you can use the Brahmagupta identity to find many similar counterexamples such as $(1^2+2^2)\cdot (2^2+3^2) = 1^2+8^2 = 4^2+7^2, $ etc.  By repeating this process, one can find numbers like $50\cdot 65 = 1^2 + 57^2 = 15^2+55^2 = 21^2 + 53^2 = 35^2 + 45^2 $ that have a potency of $2$ and are expressible as $a^2+b^2$ in arbitrarily many ways.
As André Nicolas points out, Lagrange proved that every positive integer has a potency of at most 4; the example of $7$ shows that this bound is attained.  The number 28 is the smallest number with a potency of 4 that can be expressed as a sum of four positive squares in multiple ways:
$$\begin{align}
28 & = 5^2 + 1^2 + 1^2 + 1^2 \\
   & = 3^2 + 3^2 + 3^2 + 1^2 \\
   & = 4^2 + 2^2 + 2^2 + 2^2
\end{align}$$
Other small examples include $31, 39, 47, 55, 60, $ and $63$, which is a sum of four positive squares in four ways.
