Combinatorics Issue with Long Expression

33 Views Asked by At

So I have this strange issue that I'm not sure how to resolve. If x, y, and z are randomly chosen integers from a set {1, 2, 3... 2016} and I need the probability that $6z - 3yz + xyz - 4xy + 8x + 12y - 2xz$ is divisible by seven. This should be written in a fractional form. How should I go about this? Thank you!

1

There are 1 best solutions below

5
On

Hint: $2016 = 288 \times 7$.

Hint: $6z - 3yz + xyz - 4xy + 8x + 12y - 2xz = (x- 3)(y- 2 )(z- 4 ) + 24$.

Fix $y-2, z-4$.
If either of these $ \equiv 0 \pmod{7}$, then there are no solutions for $x$.
If they are both non-zero, then there are 288 solutions in $x$. (Do you see why?)

Hence, the probability is $288 \times ( 6 \times 288) \times ( 6 \times 288) / 2016^3 = \frac{36}{343}$