generate numbers from 0 to n