I think my question is very easy but I need to understand. The problem is, I have a ticket with 2 numbers from 1 to 10. The first number cannot be greather than the second number. How many valid ticket do I have? Is there any formula to solve that? Because I have tried with permutation formula but it doesn't take care of sorting.
Thank you for your explanations.
Say you have $2$ numbers between $1$ and $n$. For valid tickets, the first number is not greater than the second number.
We count the valid tickets: First, all $n$ tickets having twice the same number are valid.
Among the remaining $n^2 - n$ tickets with two different numbers, every second ticket is valid (since swapping the numbers makes a valid ticket invalid and an invalid one valid).
So the result is $$n + \frac{n^2 - n}{2} = \frac{n^2 + n}{2}.$$
For $n=10$, you get $\frac{10^2 + 10}{2} = 55$.