There are $1000$ numbers $1,2,3,...999,1000$ to be arranged in a line so that every number other than the rightmost differs by 1 from one or more of the numbers to its right. How many different arrangements are possible?
If $1$ is the rightmost number, then there is only one possible arrangement, which is $1000,999,...,3,2,1.$ If $2$ is the rightmost number, then $1$ can be placed in any position. There are 1000−2+1=999 different arrangements. If $3$ or an even larger number is the rightmost number, then it becomes more complicated. Since the only restriction is that the numbers that are less than the rightmost number must have the larger numbers place on the right of the smaller numbers. For example, if $4$ is the rightmost number, then $1,2,3$ are the numbers that can be moved. Then $3$ must be on the right of $2$ and $2$ must be on the right of $1$.Then there are $\frac{((2015−3)+1)(2015−3)}{2}×(2015−3−1)$. So, how can I sum these up and find the total possible arrangements?