15. Let the square mean of $n$ numbers $a_{1}, a_{2}, \cdots, a_{n}$ be $\left(\frac{a_{1}^{2}+a_{2}^{2}+\cdots+a_{n}^{2}}{n}\right)^{\frac{1}{2}}$, and let the set of values of $n$ for which the square mean of the first $n(n>1)$ positive integers is an integer be denoted as $M$. Find the smallest number in the set $M$.
15. $\sqrt{\frac{1^{2}+2^{2}+\cdots+n^{2}}{n}} \in \mathbf{N}^{+}$.

Since $1^{2}+2^{2}+\cdots+n^{2}=\frac{1}{6} n(n+1)(2 n+1)$, we need $\sqrt{\frac{(n+1)(2 n+1)}{6}} \in \mathbf{N}^{+}$. Because $2 n+1$ is odd, $n+1$ must be even, so $n$ must be odd.

Let $n=2 k+1$, then $\frac{1}{6}(n+1)(2 n+1)=\frac{1}{3}(k+1)(4 k+3)$, so $k \equiv 0$ or $-1(\bmod 3), k \equiv 0$ or $-1(\bmod 4)$, so $k=0$ or $-1(\bmod 12)$.

Since $k+1$ and $4 k+3$ are coprime, both $k+1$ and $4 k+3$ must be perfect squares. Also, because $4 k+3 \equiv 3(\bmod 4)$, both $k+1$ and $\frac{4 k+3}{3}$ must be perfect squares, so $k \equiv 0(\bmod 12)$.

Let $k=12 m$, then $(16 m+1)(12 m+1)$ is a perfect square. Let $16 m+1=\alpha^{2}$, so $\alpha \equiv 1$ or $-1(\bmod 16)$, so $\alpha_{\text {min }}=15$ when $m=14, n_{\text {min }}=337$.