Where does those odds come from?
2 of 5 has 1:9.6 odds.
3 of 5 has 1:103 odds
Where do they come from?
===
They come from the multiple ways of having some of the 5 winning numbers. As mentioned above, the order isnt important, but there's only 1 chance to have all 5 numbers, so there's only 1 winning combination out of the 575,757 possible combinations. There are multiple way to have some, but not all of the winning numbers, so that gives you more than 1 chance in 575,757 of winning those prizes. How many chances is a two step calculation: (number of ways to have the right numbers) x (number of ways to have the wrong numbers). Calculating the number of combinations for right and wrong numbers is just like calculating the total possible combinations for the game: how many ways to choose r numbers from a set of n numbers. You can find an online combination calculator (which will display the combination formula when you start) here: http://www.wiley.com/college/mat/gilbert139343/java/java05_applet.html
First we'll do 4 of 5. There are 5 ways to choose 4 numbers from the 5 winning numbers. If you have 4 of the winning numbers you'll have 1 wrong number. There are 34 ways to choose 1 number from a set of 34. That gives you 5 x 34, or 170 chances out of the 575,757 possible combinations to have 4 of 5 numbers. Dividing each side by 170 simplifies to 1 in 3386.8.
For 3 of 5 it follows the same pattern. There are 10 ways to have 3 of 5 numbers. Having 3 right means you'll have 2 wrong numbers, so we calculate how many ways there are to have 2 wrong numbers, which is 561. So, 10 ways to have 3 of the 5 times 561 ways to have 2 losing numbers means you have a total of 5610 winning combinations out of the 575,757. 5610/575,757 simplifies to 1/102.6.
It works the same for 2 of 5 and 1 of 5. I'll leave that for you to work out. Of course it will also work the same way for any other game, such as a 6 of 49. All you need to do is plug the numbers in to a combination calculator.