Example 45 (1994 British Mathematical Olympiad) Find the smallest positive integer $n>1$, such that the arithmetic mean of $1^{2}, 2^{2}, 3^{2}, \cdots, n^{2}$ is a perfect square.
Let $\frac{1^{2}+2^{2}+\cdots+n^{2}}{n}=k^{2}$, where $k \in \mathbf{N}$, then
$$
\frac{1}{6}(n+1)(2 n+1)=k^{2}.
$$

Since $n \geqslant 2$, we have $\frac{1}{6}(n+1)(2 n+1) \geqslant \frac{5}{2}$, thus
$$
k^{2} \geqslant \frac{5}{2}, k \geqslant 2.
$$

Since $2 n+1$ is odd, it follows from (1) that $n$ must be odd. Let $n=2 m-1, m \geqslant 2$, substituting into (1) we get
$$
\frac{1}{3} m(4 m-1)=k^{2}.
$$

Therefore, $m$ is a multiple of 3 or $4 m-1$ is a multiple of 3.
If $m$ is a multiple of 3, then let $m=3 t, t \in \mathbf{N}$, substituting into (2) we get $t(12 t-1)=k^{2}$.
Since $t$ and $12 t-1$ are coprime, both $t$ and $12 t-1$ must be perfect squares.
But $12 t-1 \equiv 3(\bmod 4)$, which contradicts the fact that "a perfect square modulo 4 can only be 0 or 1". Therefore, it must be that $4 m-1=3 t \quad(t \in \mathbf{N})$, substituting into (2) we get
$\frac{1}{4}(3 t+1) t=k^{2}$, i.e.,
$(3 t+1) t=(2 k)^{2}$.
Since $m=\frac{1}{4}(3 t+1)$, $3 t+1$ is a multiple of 4, thus $t$ modulo 4 must be 1.
In
Lin
Yuan
Ke
Mathematics
Number
Theory
Problem
Let $t=4 j+1(j \in \mathbf{N})$ (since $m \geqslant 2$, hence $t \geqslant 3$, thus $j \geqslant 1)$, substituting into (3), we get $(3 j+1)(4 j+1)=k^{2}$.
Since $(4 j+1)-(3 j+1)=j$, and $4 j+1$ and $j$ are coprime, $4 j+1$ and $3 j+1$ are coprime, thus both $4 j+1$ and $3 j+1$ are perfect squares. Let
$$
\left\{\begin{array}{l}
3 j+1=a^{2}, \\
4 j+1=b^{2},
\end{array}\right.
$$

where $a$ is a positive integer not less than 2, and $b$ is an odd number not less than 3. From the above, we get
$3 b^{2}+1=4 a^{2}$.
Let $b=2 s+1, s \in \mathbf{N}$, substituting into the above, we get
$12 s(s+1)+4=4 a^{2}$, i.e., $3 s(s+1)+1=a^{2}$.
Since $s(s+1)$ is always even, $a$ is odd, and $a \geqslant 3$.
Thus, let $b=4 c \pm 1, a=4 d \pm 1$, where $c, d \in \mathbf{N}$, substituting into (4), we get
$3(4 c \pm 1)^{2}+1=4(4 d \pm 1)^{2}$,
expanding and simplifying, we have
$3 c(2 c \pm 1)=4 d(2 d \pm 1)$.
From the above, we know that $c$ is a multiple of 4. Thus, let
$c=4 e, e \in \mathbf{N}$,
therefore, $b=4 c \pm 1=16 e \pm 1$.
From $4 j+1=b^{2}$ we get
$j=\frac{b^{2}-1}{4}=\frac{(16 e \pm 1)^{2}-1}{4}=8 e(8 e \pm 1)$, thus
$t=4 j+1=32 e(8 e \pm 1)+1$, so
$m=\frac{1}{4}(3 t+1)=24 e(8 e \pm 1)+1$, thus
$n=2 m-1=48 e(8 e \pm 1)+1$, clearly
$n \geqslant 48 \times 1 \times(8 \times 1-1)+1=337$.
It is easy to verify that when $n=337$,
$\frac{1^{2}+2^{2}+\cdots+n^{2}}{n}=\frac{1}{6}(n+1)(2 n+1)=\frac{1}{6} \times 338 \times 675=169 \times 225=(13 \times 15)^{2}$.
In summary, the smallest positive integer $n$ less than 1 is 337.