V, 1414 13 bytes
Saved 1 byte thanks to @oktupol
á199ñÄj<C-A>òa>ñç2/2
ddd
Try it online!Try it online! <C-A>
represents the start of heading character (0x01
)
Explanation
á1 Insert a 1 on the first line
99ñ Repeat 99 times:
Ä Duplicate the last line
j<C-A> Increment the last line by one
òñç2/2 Repeat while there isFor aevery line containing a 2:
ddd Remove the line