Skip to content

Challenge 362: A likely solution

The values p and q in the quadratic expression 2x2px +q are determined by throwing two standard fair cubical dice, one red and one blue.

p is given by the value shown by the red die and q is given by the value shown on the blue die.

What is the probability that the equation 2x2px + q = 0 will have a solution that is a prime number? 

Make your solution as efficient as you can!