Question: If $m$ and $n$ are positive integers randomly chosen from the set $\{1, 2, \dots , 600\}$ with replacement, what is the probability that $2^m + 3^n$ is divisible by $35$? Express your answer as a common fraction.
1. **State the problem:** We want to find the probability that $2^m + 3^n$ is divisible by $35$ when $m$ and $n$ are chosen from $\{1, 2, \dots, 600\}$ independently and uniformly.
2. **Key idea:** Since $35 = 5 \times 7$, $2^m + 3^n$ divisible by $35$ means divisible by both $5$ and $7$.
3. **Divisibility conditions:**
- $2^m + 3^n \equiv 0 \pmod{5}$
- $2^m + 3^n \equiv 0 \pmod{7}$
4. **Analyze modulo 5:**
- The order of $2$ mod $5$ is $4$ because $2^4 = 16 \equiv 1 \pmod{5}$.
- The order of $3$ mod $5$ is also $4$ because $3^4 = 81 \equiv 1 \pmod{5}$.
So $2^m$ mod $5$ and $3^n$ mod $5$ cycle every $4$ steps.
5. **Possible residues mod 5:**
- $2^m$ mod $5$ cycles as: $2, 4, 3, 1$ for $m \equiv 1,2,3,0 \pmod{4}$ respectively.
- $3^n$ mod $5$ cycles as: $3, 4, 2, 1$ for $n \equiv 1,2,3,0 \pmod{4}$ respectively.
6. **Condition $2^m + 3^n \equiv 0 \pmod{5}$:**
We want $2^m \equiv -3^n \equiv 5 - 3^n \pmod{5}$.
Check all pairs $(m \bmod 4, n \bmod 4)$:
- $(1,1): 2 + 3 = 5 \equiv 0$
- $(2,3): 4 + 2 = 6 \equiv 1$
- $(3,2): 3 + 4 = 7 \equiv 2$
- $(0,0): 1 + 1 = 2 \neq 0$
Check all systematically:
| $m\bmod4$ | $2^m$ mod 5 | $n\bmod4$ | $3^n$ mod 5 | Sum mod 5 |
|---|---|---|---|---|
|1|2|1|3|0|
|1|2|2|4|1|
|1|2|3|2|4|
|1|2|0|1|3|
|2|4|1|3|2|
|2|4|2|4|3|
|2|4|3|2|1|
|2|4|0|1|0|
|3|3|1|3|1|
|3|3|2|4|2|
|3|3|3|2|0|
|3|3|0|1|4|
|0|1|1|3|4|
|0|1|2|4|0|
|0|1|3|2|3|
|0|1|0|1|2|
Pairs where sum mod 5 = 0 are:
- $(1,1)$, $(2,0)$, $(3,3)$, $(0,2)$
7. **Analyze modulo 7:**
- The order of $2$ mod $7$ is $3$ because $2^3 = 8 \equiv 1 \pmod{7}$.
- The order of $3$ mod $7$ is $6$ because $3^6 = 729 \equiv 1 \pmod{7}$.
8. **Possible residues mod 7:**
- $2^m$ mod $7$ cycles every $3$: $2,4,1$ for $m \equiv 1,2,0 \pmod{3}$.
- $3^n$ mod $7$ cycles every $6$: $3,2,6,4,5,1$ for $n \equiv 1,2,3,4,5,0 \pmod{6}$.
9. **Condition $2^m + 3^n \equiv 0 \pmod{7}$:**
We want $2^m \equiv -3^n \equiv 7 - 3^n \pmod{7}$.
Check all pairs $(m \bmod 3, n \bmod 6)$:
- For $m=1$: $2^m=2$
- For $m=2$: $2^m=4$
- For $m=0$: $2^m=1$
Check $3^n$ values:
| $n\bmod6$ | $3^n$ mod 7 |
|---|---|
|1|3|
|2|2|
|3|6|
|4|4|
|5|5|
|0|1|
Sum mod 7 = 0 means $2^m + 3^n \equiv 0$:
Check each $m$:
- $m=1$ ($2^m=2$): $2 + 3^n$ mod 7 = 0 means $3^n = 5$ (since $2 + 5 = 7$)
- $m=2$ ($2^m=4$): $4 + 3^n = 0$ mod 7 means $3^n = 3$
- $m=0$ ($2^m=1$): $1 + 3^n = 0$ mod 7 means $3^n = 6$
From the table:
- $3^n = 5$ when $n \equiv 5 \pmod{6}$
- $3^n = 3$ when $n \equiv 1 \pmod{6}$
- $3^n = 6$ when $n \equiv 3 \pmod{6}$
So valid pairs mod 7 are:
- $(m,n) \equiv (1,5)$
- $(m,n) \equiv (2,1)$
- $(m,n) \equiv (0,3)$
10. **Combine modulo 5 and modulo 7 conditions using CRT:**
- Mod 5 valid pairs: $(1,1), (2,0), (3,3), (0,2)$ with mod 4 for $m,n$
- Mod 7 valid pairs: $(1,5), (2,1), (0,3)$ with mod 3 for $m$ and mod 6 for $n$
We want pairs $(m,n)$ such that:
- $m \equiv a \pmod{4}$ and $m \equiv b \pmod{3}$
- $n \equiv c \pmod{4}$ and $n \equiv d \pmod{6}$
For each mod 5 pair $(a,c)$ and mod 7 pair $(b,d)$, solve:
- $m \equiv a \pmod{4}$ and $m \equiv b \pmod{3}$
- $n \equiv c \pmod{4}$ and $n \equiv d \pmod{6}$
11. **Solve for $m$:**
- $m \equiv a \pmod{4}$
- $m \equiv b \pmod{3}$
Since $4$ and $3$ are coprime, $m$ mod 12 is unique.
Check all $a \in \{0,1,2,3\}$ and $b \in \{0,1,2\}$:
- For $(a,b)$ pairs from valid mod 5 and mod 7 $m$ residues:
Mod 5 $m$ residues: $1,2,3,0$
Mod 7 $m$ residues: $1,2,0$
Calculate $m$ mod 12 for each pair:
- $(1,1)$: Solve $m \equiv 1 \pmod{4}$ and $m \equiv 1 \pmod{3}$
- $m=1$ satisfies both
- $(1,2)$: $m \equiv 1 \pmod{4}$ and $m \equiv 2 \pmod{3}$
- $m=10$ satisfies both
- $(1,0)$: $m \equiv 1 \pmod{4}$ and $m \equiv 0 \pmod{3}$
- $m=4$ satisfies both
Similarly for $a=2$:
- $(2,1)$: $m=5$
- $(2,2)$: $m=2$
- $(2,0)$: $m=8$
For $a=3$:
- $(3,1)$: $m=3$
- $(3,2)$: $m=9$
- $(3,0)$: $m=6$
For $a=0$:
- $(0,1)$: $m=7$
- $(0,2)$: $m=11$
- $(0,0)$: $m=0$
Only $m$ values with $a$ from mod 5 and $b$ from mod 7 valid pairs:
- Mod 5 $m$ residues: $1,2,3,0$
- Mod 7 $m$ residues: $1,2,0$
So valid $m$ mod 12 are:
- $(1,1) \to 1$
- $(2,2) \to 2$
- $(3,0) \to 6$
- $(0,0) \to 0$
12. **Solve for $n$:**
- $n \equiv c \pmod{4}$ from mod 5 pairs: $1,0,3,2$
- $n \equiv d \pmod{6}$ from mod 7 pairs: $5,1,3$
Find $n$ mod 12 (since lcm(4,6)=12) for each pair:
- $(1,5)$: $n=5$
- $(1,1)$: $n=1$
- $(1,3)$: $n=9$
- $(0,5)$: $n=5$
- $(0,1)$: $n=1$
- $(0,3)$: $n=3$
- $(3,5)$: $n=11$
- $(3,1)$: $n=7$
- $(3,3)$: $n=3$
- $(2,5)$: $n=10$
- $(2,1)$: $n=2$
- $(2,3)$: $n=6$
Only keep pairs where $c$ and $d$ come from valid mod 5 and mod 7 pairs:
- Mod 5 $n$ residues: $1,0,3,2$
- Mod 7 $n$ residues: $5,1,3$
Valid $n$ mod 12 are:
- $(1,5) \to 5$
- $(0,1) \to 1$
- $(3,3) \to 3$
- $(2,1) \to 2$
13. **Count valid $(m,n)$ pairs mod 12:**
- Valid $m$ mod 12: $\{0,1,2,6\}$ (4 values)
- Valid $n$ mod 12: $\{1,2,3,5\}$ (4 values)
Total valid pairs mod 12: $4 \times 4 = 16$
14. **Total possible pairs mod 12:**
- $m$ mod 12 has 12 possible residues
- $n$ mod 12 has 12 possible residues
- Total pairs mod 12: $12 \times 12 = 144$
15. **Probability:**
Since $m$ and $n$ are chosen uniformly from $1$ to $600$, and $600$ is divisible by $12$, the residues mod 12 are uniformly distributed.
Therefore, the probability is:
$$\frac{16}{144} = \frac{1}{9}$$
**Final answer:** $\boxed{\frac{1}{9}}$