(a) Find all pairs $(x,k)$ of positive integers such that $3^k -1 = x^3$ .
(b) Prove that if $n > 1$ is an integer, $n \ne 3$, then there are no pairs $(x,k)$ of positive integers such that $3^k -1 = x^n$.
### Part (a)
We need to find all pairs \((x, k)\) of positive integers such that \(3^k - 1 = x^3\).

1. Start with the equation:
   \[
   3^k - 1 = x^3
   \]
   Rearrange it to:
   \[
   3^k = x^3 + 1
   \]
2. Factor the right-hand side using the sum of cubes formula:
   \[
   3^k = (x + 1)(x^2 - x + 1)
   \]
3. Since \(3^k\) is a power of 3, both \(x + 1\) and \(x^2 - x + 1\) must be powers of 3. Let:
   \[
   x + 1 = 3^a \quad \text{and} \quad x^2 - x + 1 = 3^b
   \]
   where \(a\) and \(b\) are non-negative integers.

4. From \(x + 1 = 3^a\), we get:
   \[
   x = 3^a - 1
   \]
5. Substitute \(x = 3^a - 1\) into \(x^2 - x + 1 = 3^b\):
   \[
   (3^a - 1)^2 - (3^a - 1) + 1 = 3^b
   \]
   Simplify the left-hand side:
   \[
   3^{2a} - 2 \cdot 3^a + 1 - 3^a + 1 = 3^b
   \]
   \[
   3^{2a} - 3^{a+1} + 2 = 3^b
   \]
6. Since \(3^b\) is a power of 3, the term \(3^{2a} - 3^{a+1} + 2\) must also be a power of 3. For this to hold, the middle term must cancel out, implying:
   \[
   3^{2a} - 3^{a+1} + 2 = 3^b
   \]
   This simplifies to:
   \[
   3^{2a} - 3^{a+1} + 2 = 3^b
   \]
   For \(3^{2a} - 3^{a+1} + 2\) to be a power of 3, we need \(a = 1\):
   \[
   3^{2 \cdot 1} - 3^{1+1} + 2 = 3^2 - 3^2 + 2 = 2
   \]
   This is not a power of 3, so we need to check if there are any other values of \(a\) that satisfy the equation.

7. The only solution that works is when \(a = 1\):
   \[
   x = 3^1 - 1 = 2
   \]
   \[
   k = 3
   \]
   Therefore, the only solution is:
   \[
   (x, k) = (2, 3)
   \]

### Part (b)
We need to prove that if \(n > 1\) is an integer and \(n \ne 3\), then there are no pairs \((x, k)\) of positive integers such that \(3^k - 1 = x^n\).

1. Assume \(3^k - 1 = x^n\). Then:
   \[
   3^k = x^n + 1
   \]
2. If \(n\) is even, let \(n = 2m\). Then:
   \[
   x^{2m} \equiv -1 \pmod{3}
   \]
   This is a contradiction because \(-1\) is not a quadratic residue modulo 3. Therefore, there are no solutions for even \(n\).

3. If \(n\) is odd, let \(n = 2m + 1\). Then:
   \[
   3^k = (x + 1)\left( \sum_{i=1}^{n} (-1)^{i-1} x^{n-i} \right)
   \]
   Since \(x\) is not a multiple of 3, the sum of the terms in the expansion will be congruent to \(n\) modulo 3. Therefore, \(3 \mid n\), which contradicts the assumption that \(n \ne 3\).

Thus, there are no pairs \((x, k)\) of positive integers such that \(3^k - 1 = x^n\) for \(n > 1\) and \(n \ne 3\).

\(\blacksquare\)

The final answer is \( \boxed{ (x, k) = (2, 3) } \)