# [dc], 29 bytes

    [d1-d0<F]dsFx+p[npz1<G]sGz1<G

[Try it online!][TIO-jj8wqwki]

This is a good showing for dc because its printing capabilities are so limited, but line up perfectly with the challenge spec. Input is from the stack (and must be the only thing on the stack), output is to stdout. There's some duplication near the end I can't figure out how to get rid of without breaking the case n=1

# Explanation

    F will be the macro [d1-d0<F]
    d        copy the top of the stack
     1-      decrement
       d0<F  repeat (tail recursion) until a 0 is on top
    
    G will be the macro [npz1<G]
    n        print the top (pop, but no newline)
     p       print the new top (newline, but no pop)
      z1<G   repeat (tail recursion) until only one number is on the stack

    Full program (example input: 4)
    [d1-d0<F]dsFx      Store F and run it: new stack is 0 1 2 3 4
    +                  Drop the zero (can't just recurse to 1, or n=1 breaks)
    p                  Print (no pop) the '1': stack is 1 2 3 4
    [npz1<G]dsG        Store G
    z1<G               Run G if there's more than one number on the stack

[dc]: https://www.gnu.org/software/bc/manual/dc-1.05/html_mono/dc.html
[TIO-jj8wqwki]: https://tio.run/##S0n@b/g/OsVQN8XAxi02pditQrsgOq@gytDGPbbYHUT9/w8A "dc – Try It Online"