The Next Number solutions

The Next Number was solved using MATLAB by 5 contestants. Solution sizes: average 1173 bytes (shortest: 644; longest: 1745).