COW, 297 291 bytes
MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmoOMoOmoOmoOoommOoMoOMOOmoOMMMmoOMMMmoOOOOMoOmOoMOOMOomoOmoO
MOOMOomOoMOomoOmoomOoMMMOOOMoOmoOMMMmOomOomoomoOmoOMOOMOomOomOomOoMOomoOmoOmoOmoomOomOomOo
mOomOoMMMmoOMMMMOOMOomoOOOMmOomOoMoOmoOmoomOomOoMoomoOmoOmoOMOOMOoMOomoOMoOmOomoomoOMMMOOO
mOoMMMMMMmOoMMMMOomoo
Try it online!
The code prints each number on its own line, and separates iterations with an additional newline. It also prints the first iteration by itself, followed by a newline. So an input of 5 would give an output that looks like 5 2 2
except with newlines instead of spaces. Sample output for 50
is given below.
Explanation tree:
MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmoOMoOmoOmoOoom ;Store 10 in [0], 1 in [1], and integer input in [3]
mOoMoO ;Store 1 in [2]
MOO ;Loop while [2] is non-zero
moOMMMmoOMMMmoOOOOMoOmOo ; Copy [3] to [4], clear contents of [5], and store 1 in [5]
MOO ; Loop while [4] is non-zero
MOomoOmoO ; Decrement 4 and move to 6
MOO ; Loop while [6] is non-zero
MOomOoMOomoO ; Decrement [5] and [6]
moo ; End loop once [6] is empty
mOoMMMOOOMoOmoOMMMmOomOo ; Copy [5] to [6], and reset [5] to 1, then move back to [4]
moo ; End loop now that [4] is empty. [6] now contains the parity of [3]
moOmoO ; Navigate to [6]
MOO ; Loop while [6] is non-empty
MOomOomOomOoMOomoOmoOmoO ; Decrememnt [3] and [6]
moo ; End loop now that [6] is empty. [3] now contains the largest even number less than the previous iteration.
mOomOomOomOomOoMMMmoOMMM ; Copy [1] to [2]
MOO ; Loop while [2] is non-empty
MOomoOOOMmOomOoMoOmoO ; Decrement [2], increment [1], and print the number in [3].
moo ; End loop now that [2] is empty
mOomOoMoo ; Print a new line
moOmoOmoO ; Navigate to [3]
MOO ; Loop while [3] is non-empty
MOoMOomoOMoOmOo ; Decrement [3] twice and increment [4] once
moo ; [4] now contains half of [3]
moOMMMOOOmOoMMM ; Copy [4] to [3] and clear [4]
MMMmOoMMMMOo ; Copy [3] to [2] and decrement once
moo ;End loop now that [2] is empty
Sample output for input 50:
50
24
24
12
12
12
12
6
6
6
6
6
6
6
6
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2