Skip to main content
1 of 4
Jonathan Allan
  • 115.5k
  • 8
  • 68
  • 293

Jelly, 12 bytes

R«Ṛ$‘r⁸ṬUÐeY 

A monadic link accepting an integer which yields a mixed-list of integers and newline characters. When run as a full program this is printed as defined in the OP.

Try it online!

Jonathan Allan
  • 115.5k
  • 8
  • 68
  • 293