Assuming the list is ordered you could start at the end and keep subtracting the next one down. While the difference is 1, you're in a range. When it's not, you start a new range.
i.e
16-15 = 1
15-14 = 1
14-12 = 2, the range is 16-14 - start a new range.