[i](The following problem is open in the sense that the answer to part (b) is not currently known.)[/i]
[list=a]
[*] Let $n$ be a positive integer that is not a perfect square. Find all pairs $(a,b)$ of positive integers for which there exists a positive real number $r$, such that
$$r^a+\sqrt{n} \ \ \text{and} \ \ r^b+\sqrt{n}$$
are both rational numbers.
[*] Let $n$ be a positive integer that is not a perfect square. Find all pairs $(a,b)$ of positive integers for which there exists a real number $r$, such that
$$r^a+\sqrt{n} \ \ \text{and} \ \ r^b+\sqrt{n}$$
are both rational numbers.
[/list]
1. **Claim**: The only solutions are $\boxed{a = b}$. Clearly, these work, so now WLOG assume $a > b$.

2. **Step 1**: By replacing $r$ by $r^d$ if necessary, we can assume $\gcd(a, b) = 1$. Also, $r \neq 1$ since $\sqrt{n}$ is not rational.

3. **Claim 1**: $r > 1$.
   - **Proof**: Assume for the sake of contradiction that $r < 1$. Let $r^a + \sqrt{n} = q$ and $r^b + \sqrt{n} = s$ be (positive) rationals; then $q < s$. But $(q - \sqrt{n})^b = (s - \sqrt{n})^a$. Taking conjugates in $\mathbb{Q}(\sqrt{n})$, we get $(q + \sqrt{n})^b = (s + \sqrt{n})^a$, which is absurd because $a > b$ and $s + \sqrt{n} > q + \sqrt{n} > 1$. $\blacksquare$

4. **Claim 2**: $r \in \mathbb{Q}(\sqrt{n})$.
   - **Proof**: This follows from Bézout's identity because $r^a, r^b \in \mathbb{Q}(\sqrt{n})$ and $\gcd(a, b) = 1$. $\blacksquare$

5. **Claim 3**: $r = c - d \sqrt{n}$ where $c, d$ are positive rational numbers.
   - **Proof**: Write $r = c - d \sqrt{n}$ where $c, d$ are some rationals. One of $a, b$ must be odd, so assume $a$ is odd (the other case works similarly). Setting the $\sqrt{n}$ part of $(c - d \sqrt{n})^a + \sqrt{n}$ to $0$, we get
     \[
     \sum_{i=0}^{\frac{a-1}{2}} \binom{a}{2i+1} c^{a-2i-1} d^{2i+1} n^i = 1
     \]
     Since each $a - 2i - 1$ is even, $c^{a-2i-1} \geq 0$, and $d^{2i+1}$ has the same sign as $d$, so the above can hold only if $d > 0$. Now since $r > 0$, we also get $c > 0$. $\blacksquare$

6. **Step 2**: Now, if we directly expand $r^{a-b} = (c - d \sqrt{n})^{a-b}$, we get that it is equal to $c_0 - d_0 \sqrt{n}$ for some positive rationals $c_0, d_0$ (this is because all the irrational terms would have an odd exponent of $-d \sqrt{n}$, and rational terms would have even exponent). Now $r > 1$ implies $r^{a-b} > 1$ implies $c_0 - d_0 \sqrt{n} > 1$ implies $c_0 > 1$.

7. **Step 3**: Recall that $r^a = q - \sqrt{n}$ and $r^b = s - \sqrt{n}$. Then we have
   \[
   q - s = r^a - r^b = r^b (r^{a-b} - 1) = (s - \sqrt{n})(c_0 - 1 - d_0 \sqrt{n}) = s(c_0 - 1) + d_0 n - ((c_0 - 1) + s d_0) \sqrt{n}
   \]
   which is a contradiction since the LHS is rational while the RHS has a non-zero $\sqrt{n}$ part (because $(c_0 - 1) + s d_0 > 0$). Hence there are no solutions when $a \neq b$. $\blacksquare$