Recently, I have found a bijective mapping \$f\$ from positive integers to finite, nested sequences. The purpose of this challenge is to implement it in the language of your choice.
The Mapping
Consider a number \$n\$ with the factors \$2^{a_1}3^{a_2}5^{a_3}\cdots p^{a_i}\$ where \$a_i > 0\$
$$f(n) = \{f(a_2+1),f(a_3+1),\cdots,f(a_i+1),\underbrace{\{\},\{\},\cdots,\{\}}_{a_1}\}$$
For example:
$$\begin{align} f(22308) & = \{f(2),f(1),f(1),f(2),f(3),\{\},\{\}\} \\ & = \{\{\{\}\},\{\},\{\},\{\{\}\},\{f(2)\},\{\},\{\}\} \\ & = \{\{\{\}\},\{\},\{\},\{\{\}\},\{\{\{\}\}\},\{\},\{\}\} \end{align}$$
Rules
- You may write a full program or a function to do this task.
- Output can be in any format recognisable as a sequence.
- Built-ins for prime factorization, primality testing, etc. are allowed.
- Standard loopholes are disallowed.
- Your program must complete the last test case in under 10 minutes on my machine.
- This is code-golf, so the shortest code wins!
Test Cases
10
:{{},{{}},{}}
21
:{{{}},{},{{}}}
42
:{{{}},{},{{}},{}}
30030
:{{{}},{{}},{{}},{{}},{{}},{}}
44100
:{{{{}}},{{{}}},{{{}}},{},{}}
16777215
:{{{{}}},{{}},{{}},{},{{}},{{}},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{{}}}
16777213
: pastebin