The Rien Number

Perl, 44 42 41 33 31 bytes

Yaaay, first post ever !

Thanks to primo for the 2 bytes save.

print 1,sort"@{[2..<>]}"=~/\d/g

As others did, removing 1 and prepending it manually does the work.

Try it online


Pyth, 8

+1SjktSQ

Makes a list [1, .. , input] then removes the leading one, joins and sorts, then prepends a 1.

Test Suite


Japt, 14 12 bytes

1+2o°U ¬¬n ¬

Try it online!

How it works

1+2o°U ¬¬n ¬  // Implicit: U = input integer
  2o°U        // Generate the range of integers from 2 to U, inclusive.
       ¬¬     // Join, then split into chars.
         n    // Sort.
1+         ¬  // Join again, and add a 1 to the beginning.
              // Implicit: output last expression