Let be the set of non-negative integer triples that satisfy the equation . If a triple is chosen uniformly at random from , then what is the probability that the product is divisible by ?
If the probability is , where are positive coprime integers, then enter as your answer.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
First, the number of elements in S can be calculated using the stars and bars method . We find that
∣ S ∣ = ( 3 − 1 2 8 + 3 − 1 ) = ( 2 3 0 ) = 2 3 0 × 2 9 = 4 3 5 .
Now as 7 is prime, x y z will be divisible by 7 if and only if at least one of x , y , z to be divisible by 7 . If we let
N x , N y , N z be the number of elements of S in which x , y , z , respectively, are divisible by 7 ,
N x y , N x z , N y z be the number of elements of S in which both subscript variables are divisible by 7 , and
N x y z be the number of elements of S in which all of x , y , z are divisible by 7 ,
then by inclusion-exclusion the number of elements ( x , y , z ) of S for which 7 ∣ x y z is
N x + N y + N z − N x y − N x z − N y z + N x y z .
Now by symmetry N x = N y = N z . Also, since the sum of the variables is 2 8 , i.e., a multiple of 7 , if any two of x , y , z are divisible by 7 then so must the third variable. By this fact and symmetry we have that N x y = N x z = N y z = N x y z .
To calculate N x , we first note that x ∈ { 0 , 7 , 1 4 , 2 1 , 2 8 } . This in turn requires us to find the number of non-negative integer solutions to y + z = 2 8 − x for each of the 5 possible values for x . By stars and bars the number of solutions will be ( 1 2 8 − x + 2 − 1 ) = 2 9 − x , and thus
N x = 2 9 + 2 2 + 1 5 + 8 + 1 = 7 5 .
Next, to calculate N x y z , (and thus also N x y , N x z and N y z ), we need to count all permutations of the triples ( 0 , 0 , 2 8 ) , ( 0 , 7 , 2 1 ) , ( 0 , 1 4 , 1 4 ) and ( 7 , 7 , 1 4 ) . This adds up to 3 + 6 + 3 + 3 = 1 5 .
So by inclusion-exclusion the number of suitable triples is 3 × 7 5 − 2 × 1 5 = 1 9 5 , which gives us a probability of 4 3 5 1 9 5 = 2 9 1 3 . So finally a + b = 1 3 + 2 9 = 4 2 .