Prove that there are infinitely many positive integers $n$ with the following property: For any $n$ integers $a_{1},a_{2},...,a_{n}$ which form in arithmetic progression, both the mean and the standard deviation of the set $\{a_{1},a_{2},...,a_{n}\}$ are integers. Remark. The mean and standard deviation of the set $\{x_{1},x_{2},...,x_{n}\}$ are defined by $\overline{x}=\frac{x_{1}+x_{2}+...+x_{n}}{n}$ and $\sqrt{\frac{\sum (x_{i}-\overline{x})^{2}}{n}}$, respectively.
Problem
Source: 3-rd Taiwanese Mathematical Olympiad 1994
Tags: arithmetic sequence, number theory unsolved, number theory