N3. Find the smallest number $n$ such that there exist polynomials $f_{1}, f_{2}, \ldots, f_{n}$ with rational coefficients satisfying
$$
x^{2}+7=f_{1}(x)^{2}+f_{2}(x)^{2}+\cdots+f_{n}(x)^{2} .
$$
Answer. The smallest $n$ is 5 .
Solution 1. The equality $x^{2}+7=x^{2}+2^{2}+1^{2}+1^{2}+1^{2}$ shows that $n \leq 5$. It remains to show that $x^{2}+7$ is not a sum of four (or less) squares of polynomials with rational coefficients.

Suppose by way of contradiction that $x^{2}+7=f_{1}(x)^{2}+f_{2}(x)^{2}+f_{3}(x)^{2}+f_{4}(x)^{2}$, where the coefficients of polynomials $f_{1}, f_{2}, f_{3}$ and $f_{4}$ are rational (some of these polynomials may be zero).

Clearly, the degrees of $f_{1}, f_{2}, f_{3}$ and $f_{4}$ are at most 1 . Thus $f_{i}(x)=a_{i} x+b_{i}$ for $i=1,2,3,4$ and some rationals $a_{1}, b_{1}, a_{2}, b_{2}, a_{3}, b_{3}, a_{4}, b_{4}$. It follows that $x^{2}+7=\sum_{i=1}^{4}\left(a_{i} x+b_{1}\right)^{2}$ and hence
$$
\sum_{i=1}^{4} a_{i}^{2}=1, \quad \sum_{i=1}^{4} a_{i} b_{i}=0, \quad \sum_{i=1}^{4} b_{i}^{2}=7 .
$$

Let $p_{i}=a_{i}+b_{i}$ and $q_{i}=a_{i}-b_{i}$ for $i=1,2,3,4$. Then
$$
\begin{aligned}
\sum_{i=1}^{4} p_{i}^{2} & =\sum_{i=1}^{4} a_{i}^{2}+2 \sum_{i=1}^{4} a_{i} b_{i}+\sum_{i=1}^{4} b_{i}^{2}=8, \\
\sum_{i=1}^{4} q_{i}^{2} & =\sum_{i=1}^{4} a_{i}^{2}-2 \sum_{i=1}^{4} a_{i} b_{i}+\sum_{i=1}^{4} b_{i}^{2}=8 \\
\text { and } \quad \sum_{i=1}^{4} p_{1} q_{i} & =\sum_{i=1}^{4} a_{i}^{2}-\sum_{i=1}^{4} b_{i}^{2}=-6,
\end{aligned}
$$
which means that there exist a solution in integers $x_{1}, y_{1}, x_{2}, y_{2}, x_{3}, y_{3}, x_{4}, y_{4}$ and $m>0$ of the system of equations
(i) $\sum_{i=1}^{4} x_{i}^{2}=8 m^{2}$,
(ii) $\sum_{i=1}^{4} y_{i}^{2}=8 m^{2}$,
(iii) $\sum_{i=1}^{4} x_{i} y_{i}=-6 m^{2}$.

We will show that such a solution does not exist.
Assume the contrary and consider a solution with minimal $m$. Note that if an integer $x$ is odd then $x^{2} \equiv 1(\bmod 8)$. Otherwise (i.e., if $x$ is even) we have $x^{2} \equiv 0(\bmod 8)$ or $x^{2} \equiv 4$ (mod 8). Hence, by (i), we get that $x_{1}, x_{2}, x_{3}$ and $x_{4}$ are even. Similarly, by (ii), we get that $y_{1}, y_{2}, y_{3}$ and $y_{4}$ are even. Thus the LHS of (iii) is divisible by 4 and $m$ is also even. It follows that $\left(\frac{x_{1}}{2}, \frac{y_{1}}{2}, \frac{x_{2}}{2}, \frac{m_{2}}{2}, \frac{x_{1}}{2}, \frac{y_{1}}{2}, \frac{x_{4}}{2}, \frac{y_{4}}{2}, \frac{m}{2}\right)$ is a solution of the system of equations (i), (ii) and (iii), which contradicts the minimality of $m$.

Solution 2. We prove that $n \leq 4$ is impossible. Define the numbers $a_{i}, b_{i}$ for $i=1,2,3,4$ as in the previous solution.
By Euler's identity we have
$$
\begin{aligned}
\left(a_{1}^{2}+a_{2}^{2}+a_{3}^{2}+a_{4}^{2}\right)\left(b_{1}^{2}+b_{2}^{2}+b_{3}^{2}+b_{4}^{2}\right) & =\left(a_{1} b_{1}+a_{2} b_{2}+a_{3} b_{3}+a_{4} b_{4}\right)^{2}+\left(a_{1} b_{2}-a_{2} b_{1}+a_{3} b_{4}-a_{4} b_{3}\right)^{2} \\
& +\left(a_{1} b_{3}-a_{3} b_{1}+a_{4} b_{2}-a_{2} b_{4}\right)^{2}+\left(a_{1} b_{4}-a_{4} b_{1}+a_{2} b_{3}-a_{3} b_{2}\right)^{2} .
\end{aligned}
$$

So, using the relations (1) from the Solution 1 we get that
$$
7=\left(\frac{m_{1}}{m}\right)^{2}+\left(\frac{m_{2}}{m}\right)^{2}+\left(\frac{m_{3}}{m}\right)^{2},
$$
where
$$
\begin{array}{l}
\frac{m_{1}}{m}=a_{1} b_{2}-a_{2} b_{1}+a_{3} b_{4}-a_{4} b_{3}, \\
\frac{m_{2}}{m}=a_{1} b_{3}-a_{3} b_{1}+a_{4} b_{2}-a_{2} b_{4}, \\
\frac{m_{3}}{m}=a_{1} b_{4}-a_{4} b_{1}+a_{2} b_{3}-a_{3} b_{2}
\end{array}
$$
and $m_{1}, m_{2}, m_{3} \in \mathbb{Z}, m \in \mathbb{N}$.
Let $m$ be a minimum positive integer number for which (2) holds. Then
$$
8 m^{2}=m_{1}^{2}+m_{2}^{2}+m_{3}^{2}+m^{2} .
$$

As in the previous solution, we get that $m_{1}, m_{2}, m_{3}, m$ are all even numbers. Then $\left(\frac{m_{1}}{2}, \frac{m_{2}}{2}, \frac{m_{2}}{2}, \frac{m}{2}\right)$ is also a solution of (2) which contradicts the minimality of $m$. So, we have $n \geq 5$. The example with $n=5$ is already shown in Solution 1 .