The rule is similar to spider solitaire but simpler.
There are n cards, each with a unique number from 1 to n. The cards are drawn one by one, and the first card is placed directly on the table. After the second card is compared with the value of the card on the table, if the value of the card drawn is relatively large, it will cover the card on the table. (Otherwise will be discarded)Find out the expectation value of how many cards are on the table after the above operations are completed.
I think there is a recurrence formula while but I stuck here and don't know how to do the next step. Maybe there is another way to solve the problem.
Can anyone help me?