This sequence is generated by:
$$a_n = \tau_n a_{n - 1} ~ \text{with} ~ a_0 = 1$$
Where $\tau_n$ is given by:
$$\tau_n = \begin{cases} 1 ~ ~ &\text{if} ~ 1 \leq n \leq 3 \\ 2 ~ ~ &\text{if} ~ 4 \leq n \leq 6 \\ 3 ~ ~ &\text{if} ~ 7 \leq n \leq 9 \\ &\cdots \end{cases}$$
It's easy to see that $\tau_{3n} = n$ and since every three elements 1, 2, 3, then 4, 5, 6, then 7, 8, 9, etc. are the same, we have $\tau_{3n - 2} = \tau_{3n - 1} = n$ and $\tau_{3n + 1} = \tau_{3n + 2} = n + 1$.
Now observe that:
$$a_{3n} = \tau_{3n} a_{3n - 1} = \tau_{3n} \tau_{3n - 1} a_{3n - 2} = \tau_{3n} \tau_{3n - 1} \tau_{3n - 2} a_{3(n - 1)} = n^3 a_{3(n - 1)}$$
So that by induction we have:
$$a_{3n} = (n!)^3$$
Then:
$$a_{3n + 1} = \tau_{3n + 1} a_{3n} = (n + 1) (n!)^3$$
And:
$$a_{3n + 2} = \tau_{3n + 2} a_{3n + 1} = \tau_{3n + 2} \tau_{3n + 1} a_{3n} = (n + 1)^2 (n!)^3$$
And so we can conclude:
$$a_n = \begin{cases} (m!)^3 ~ ~ &\text{if} ~ n = 3m \\ (m + 1) (m!)^3 ~ ~ &\text{if} ~ n = 3m + 1 \\ (m + 1)^2 (m!)^3 ~ ~ &\text{if} ~ n = 3m + 2 \end{cases}$$
Or, more directly:
$$a_n = \left ( \left \lfloor \frac{n}{3} \right \rfloor + 1 \right )^{n \bmod{3}} \left ( \left \lfloor \frac{n}{3} \right \rfloor ! \right)^3$$
I suppose this can be easily generalized to any similar $\tau_n$ sequence of the form 1, 1, $k$ times, 2, 2, $k$ times, etc.. but I haven't tried.