I am trying to work out the chance of hitting a target number using the highest result of 1, 2, or 3 20-sided dice, and I am now trying to figure out how this result is changed by the addition of various other dice. An extra complexity to this formula is that a result of 1 on the 20-sided dice cannot be altered and always fails. I have managed to get a formula for adding a single die:
$$p=\frac{1}{20^xn}((n(y-1)^x-(n-y+2))- \begin{cases} (\frac{(y-2)(y-1)}{2})^2, \text{ if } x=3\\ \frac{(y-2)(y-1)(2(y-2)+1)}{6}, \text{ if } x=2\\ \frac{(y-2)(y-1)}{2}, \text{ if } x=1\\ \end{cases}\Biggr)$$
where x is the amount of 20-sided dice, n is the faces of the additional die, and y is the target value.
The result of the above formula works out added chance of reaching the target, on top of the highest result of the 20-sided dice. So if we are trying to reach 4, the chance of 2 20-sided dice being at least 4 would be $b=1-(1-\frac{21-4}{20})^2=0.9775$, and the chance added by adding a 4-sided die using the above formula would be $p=0.018125$, for a total of $t=b+p=0.995625$. Keeping in mind that a 1 on the 20-sided die result cannot be altered by adding more dice and always fails.
But after doing that my brain is fried. Does anyone know how to expand this formula to incorporate n dice with variable sides, for example, a 4-sided die and a 6-sided die? From my calculations, the below should be the desired $p$ results of the formula for each value of $y$.
\begin{array}{|c|c|c|c|c|c|} \hline y & 3 & 4 & 5 & 6 & 7 \\ \hline p & 0.0075 & 0.0125 & 0.037291\dot{6} & 0.0726041\dot{6} & 0.1153125 \\ \hline y & 8 & 9 & 10 & 11 & 12+ \\ \hline p & 0.1611458\dot{3} & 0.2080208\dot{3} & 0.2538541\dot{6} & 0.2986458\dot{3} & 0.342708\dot{3} \\ \hline \end{array}
If a formula for the total probability is easier than increased probability, then that would also be acceptable.
As a bonus, much simpler question, is there an equation for finding the chance to roll an exact value on multiple dice? Using the above example, a 4-sided die and a 6-sided die? Everywhere I look online is 2 dice with the same number of sides and uses a table of results.