Answer:
If the number has 5 numbers in any order (different ones)
The number of possible combinations is equal to product of the number of options that we have for each of the 5 numbers.
For the first one we have 40 numbers to choice.
for the second one we have 39, because we already took one.
for the third one we have 38
for the fourth we have 37
for the fifth we have 36
Then the number of combinations is:
40*37*38*37*36 = 78960960
and because the order does not matter, we need to divide by the posible permutations, for a 5 digit number the number of permutations is:
5 options for the first digit.
4 for the second.
3 for the third.
and so on:
P = 5*4*3*2*1 = 5!
so the number of combinations is: c = 78960960/5! = 658008
This means that if you buy a ticket, your probability of winning is 1 out of 658008, or p = 1/658008.
And if the order actually does matter, we use the previous number, with only 1 ticket the probability is 1 out of 78960960 or p = 1/78960960 which is a lot smaller.