For the context of this challenge, a matched group is a digit \$n\$, followed by \$n\$ more matched groups. In the case of \$n = 0\$, that's the whole matched group. Digits only go up to 9.
For example, 3010200 is a valid matched group, as:
3 # 3, capturing three elements...
0 # a 0 (group 1)
1 # a 1 (group 2), capturing...
0 # a 0
2 # And a 2 (group 3), capturing...
0 # a 0
0 # and another 0.
A fully matched number is simply any valid matched group.
The list begins:
0, 10, 110, 200, 1110, 1200, 2010, 2100, 3000, 11110, 11200, 12010, 12100, 13000, 20110, 20200, 21010, 21100, 22000, 30010, 30100, 31000, 40000
(As usual, these are hand-generated :P)
Your task is to implement this sequence.
Standard code-golf and sequence rules apply.
Testcases
These are zero-indexed. Last testcase thanks to tjjfvi.
0 -> 0
1 -> 10
4 -> 1110
6 -> 2010
9 -> 11110
13 -> 13000
18 -> 22000
22 -> 40000
64 -> 500000
100000000000
a fully matched number, or do digits only go up to9
? \$\endgroup\$n
fully matched numbers allowed? \$\endgroup\$