Question 159
Determine all sequences $a_{1}, a_{2}, \ldots$ of positive integers such that, for any pair of positive integers $m \leqslant n$, the arithmetic and geometric means
$$
\frac{a_{m}+a_{m+1}+\cdots+a_{n}}{n-m+1} \quad \text{ and } \quad \left(a_{m} a_{m+1} \cdots a_{n}\right)^{\frac{1}{n-m+1}}
$$
are both integers.
$$
\frac{a_{m}+a_{m+1}+\cdots+a_{n}}{n-m+1} \quad \text{ and } \quad \left(a_{m} a_{m+1} \cdots a_{n}\right)^{\frac{1}{n-m+1}}
$$
are both integers.