This is actually based on the print dialog where you choose a multi-range number, like 1-5, 8, 11-13
returning 1, 2, 3, 4, 5, 8, 11, 12, 13
(number took from Chrome print dialog).
Interesting that converting to and from a list is the easiest (and probably fastest!) way to do this.
Alternatively: