# How many times must I roll to have had a chance of rolling a desired result at least a certain number of times cumulatively?

I am familiar with the following formula which describes the probability of rolling a certain desired outcome at least once after a certain number of rolls:

$$1-(1-x)^y$$

Where $$x$$ is the probability of the desired outcome on one roll and $$y$$ is the number of rolls. So for example, if I have a 10% chance of winning a lottery, I will have needed to play 22 times to have had a 90% chance of winning the lottery at least once (set the equation equal to 0.9, simply solve for $$y$$)

However, is there a formula to describe the chance of rolling a certain desired outcome at least a certain number of times (that may be greater than one) cumulatively (need not be in a row) after a certain number of rolls?

Example: How many times must I roll a die to have had a 60% chance of rolling 5 at least 3 times?

Bonus: Could you expand this formula to rolling two (or more, but two is okay) independent desired outcomes with two different probabilities, with two different numbers of desired results?

Bonus Example: Playing the lottery, I have a 10% chance of winning a minor prize and 1% chance of winning a major prize. How many times must I play to have had a 50% chance of winning the minor prize 10 times and the major prize 2 times? I am aware that on average, I should be "short" on major prizes for the requirement due to the odds, (on average after 2 major prizes I should have 20 minor prizes, over the requirement) but I wasn't sure if this would factor into a total "cumulative" chance formula.

Clarification: You can't get a minor prize and a major prize in one play. Essentially, you have 10% minor, 1% major, and 89% lose.

Thanks in advance.