Consider the following two sets, $$E_n= \left\{ \sum_{i=1}^na_i^2 \ | \ a_i \in \mathbb{N} \right\} \ \text{ and } \ F_n=\left\{ \Vert A \Vert^2 \ | \ A \in M_n(\mathbb{N}) \right\},$$ with $\Vert A \Vert$ the [operator norm][1]. If $A = (u,0,\cdots, 0)$ then $\Vert A \Vert^2 = \Vert u \Vert^2$. It follows that $E_n \subseteq F_n$. The case $n=3$ is exceptional in the sense that $E_n= F_n$ $\forall n \neq 3$ whereas $E_3 \subsetneq F_3$: - obviously $E_1=F_1$, - it is proved [here][2] that $E_2=F_2$, - for $n \ge 4$, $E_n=F_n$ because $E_4 = \mathbb{N}$, by [Lagrange's four square theorem][3], - finally, $E_3 \subsetneq F_3$ because $E_3E_3 \subseteq F_3$ (see investigation below) and > [**Legendre's three-square theorem**:][4] $E_3 = \mathbb{N} \setminus \{ 4^a(8b+7) \ | \ a,b \in \mathbb{N} \}$. The computation below shows that $F_3$ contains every natural number less than $10^6$; leading to: **Question**: Does the form $\Vert A \Vert^2$ cover every natural number for $A \in M_3(\mathbb{N})$? *Remark:* It is proved [here][5] for $A \in M_3(\mathbb{Z})$. _____________ __________ **Investigation** Note that $\Vert A \Vert^2$ is the largest eigenvalue of $A^*A$. Assume that $A=(u_1,u_2,u_3)$ with $u_i \in \mathbb{N}^3$. Then, observe that the characteristic polynomial of $A^*A$ is $$P(x) = x^3-\left(\sum_{i=1}^3 \Vert u_i \Vert^2 \right)x^2 + \left( \sum_{i<j} \Vert u_i \times u_j \Vert^2 \right)x - \left( u_1 \cdot (u_2 \times u_3) \right)^2 $$ with $u \times v$ the [cross product][6] and $u \cdot v$ the [dot product][7]. Assume that the vectors $u_1, u_2, u_3$ are linearly dependent. Then > $$\Vert A \Vert^2 = \frac{1}{2} \left( \sum_{i=1}^3 \Vert u_i \Vert^2 + \sqrt{\left( \sum_{i=1}^3 \Vert u_i \Vert^2 \right)^2 -4 \sum_{i<j} \Vert u_i \times u_j \Vert^2} \right)$$ Assume that $u_1, u_2, u_3$ are collinear, i.e. there is $u \in \mathbb{N}^3$ and $k_i \in \mathbb{N}$ such that $u_i = k_iu$. Then $$\Vert A \Vert^2 = \Vert u \Vert^2 \sum_{i=1}^3 k_i^2$$ It follows that $F_3$ contains the set $E_3E_3$. Observe that $E_3E_3 = \mathbb{N} \setminus I $ with $I$ the set of natural numbers $n$ of the form $8a-1$ whose prime factors are of the form $8b \pm 1$. The first elements of $I$ are $7, 23, 31, 47, 71, 79, 103, 119, 127, 151, 167, 191, 199, \dots$ Now assume just that $u_3=0$. Then \begin{align*} \Vert A \Vert^2&=\frac{1}{2} \left( \Vert u_1 \Vert^2 + \Vert u_2 \Vert^2 + \sqrt{\left( \Vert u_1 \Vert^2 + \Vert u_2 \Vert^2 \right)^2 -4 \Vert u_1 \times u_2 \Vert^2} \right)\\ &=\frac{1}{2} \left( \Vert u_1 \Vert^2 + \Vert u_2 \Vert^2 + \sqrt{\left( \Vert u_1 \Vert^2 - \Vert u_2 \Vert^2 \right)^2 + 4 (u_1 \cdot u_2)^2} \right) \end{align*} If moreover, $\Vert u_1 \Vert = \Vert u_2 \Vert$ then $\Vert A \Vert^2 = \Vert u_1 \Vert^2 + (u_1 \cdot u_2) = \frac{1}{2} \Vert u_1+u_2 \Vert^2 $, and we know by [this post][8] that this form covers every odd less than $90000$, except those in $\{ 5, 23, 29, 65, 167 \}$. So the above models together with the following equalities covers every $n<90000$. $$ 23 = \left\| \pmatrix{0&2&0\\ 1&4&0 \\ 2&1&0} \right\|^2 \ \text{ and } \ 167 = \left\| \pmatrix{0&7&0\\ 2&5&0 \\ 8&7&0} \right\|^2.$$ If $u_1=(a,b,c)$, $u_2 = (b,c,a)$ and $u_3=0$, then $2\Vert A \Vert^2 = (a+b)^2+(b+c)^2+(c+a)^2$. Observe (after [this comment][9] of [Hagen von Eitzen][10]) that we are reduced to show that $\forall n \in I$ with $n \ge 90000$, $2n$ is a sum of three squares $x^2+y^2+z^2$ (which is true by Legendre's three-square theorem) with the additional assumption that $x,y,z$ are the integer sides of a triangle (i.e. $x \le y \le z \le x+y $), which is checked below for $2543<n<10^6$. *Remark*: This *stronger* version of Legendre's three-square theorem is suspected to be true for every $2n$ with $n$ odd greater than $5969$ (see [this post][11]), and in general, every *sufficiently large* element of $E_3$. _____ **Computation** sage: ModelOutEE(2544,1000000) [] _______ **Code** cpdef legendre_inter(int i): cdef int n,a,b,c,j n=isqrt(i) for a in range(n+1): for b in range(a+1): j=i-a**2-b**2 if j>=0: c=isqrt(j) if c**2==j: if c<=a and a<=b+c: return True if c>a and c<=a+b: return True return False cpdef is_EE(int i): cdef int a,l cdef list f cdef tuple j if not Integer(i).mod(8)==7: return True b=0 f=list(factor(i)) for j in f: a=j[0] if not Integer(a).mod(8) in [1,7]: return True return False cpdef ModelOutEE(int r1, int r2): cdef int i cdef list L L=[] for i in range(r1,r2): if not is_EE(i): if not legendre_inter(2*i): L.append(i) return L [1]: https://en.wikipedia.org/wiki/Matrix_norm#Matrix_norms_induced_by_vector_norms [2]: https://math.stackexchange.com/a/2963285/84284 [3]: https://en.wikipedia.org/wiki/Lagrange%27s_four-square_theorem [4]: https://en.wikipedia.org/wiki/Legendre%27s_three-square_theorem [5]: https://math.stackexchange.com/a/2967989/84284 [6]: https://en.wikipedia.org/wiki/Cross_product [7]: https://en.wikipedia.org/wiki/Dot_product [8]: https://mathoverflow.net/q/313675/34538 [9]: https://math.stackexchange.com/questions/2975032/odd-of-the-form-a2b2c2abacbc#comment6140448_2975032 [10]: https://math.stackexchange.com/users/39174/hagen-von-eitzen [11]: https://math.stackexchange.com/q/2975032/84284