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.
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.