Question 23
We say a sequence $a_1, a_2, a_3, \dots$ of positive integers is *alagoana* if, for every positive integer $n$, the following two conditions hold simultaneously:
* $a_{n!} = a_1 \cdot a_2 \cdot \dots \cdot a_n$.
* $a_n$ is the $n$th power of a positive integer.
Determine all the sequences that are *alagoanas*.
(Note that $n! = 1 \cdot 2 \cdot 3 \cdot \dots \cdot n$. For example, $4! = 1 \cdot 2 \cdot 3 \cdot 4 = 24$. Thus, our sequence satisfies, for example, $a_{24} = a_{4!} = a_1 \cdot a_2 \cdot a_3 \cdot a_4$.)
* $a_{n!} = a_1 \cdot a_2 \cdot \dots \cdot a_n$.
* $a_n$ is the $n$th power of a positive integer.
Determine all the sequences that are *alagoanas*.
(Note that $n! = 1 \cdot 2 \cdot 3 \cdot \dots \cdot n$. For example, $4! = 1 \cdot 2 \cdot 3 \cdot 4 = 24$. Thus, our sequence satisfies, for example, $a_{24} = a_{4!} = a_1 \cdot a_2 \cdot a_3 \cdot a_4$.)