get sequential numbers in a array