the program returns an array starting at 1 and ending with user inputted number