39 Find all positive integers $x, k, n (n \geqslant 2)$, such that
$$3^{k}-1=x^{n}$$
39. From the condition, we know $x \geqslant 2$.

If $n$ is even, then by the property of perfect squares $\equiv 0$ or $1(\bmod 3)$, we have $x^{n} \equiv 0$ or $1(\bmod 3)$, but $3^{k}-1 \equiv 2(\bmod 3)$, so there is no solution in this case.

If $n$ is odd, then
$$3^{k}=x^{n}-1=(x+1)\left(x^{n-1}-x^{n-2}+\cdots-x+1\right) .$$

Thus, both $x+1$ and $A=x^{n-1}-x^{n-2}+\cdots-x+1$ are powers of 3.
Notice that,
$$A \equiv(-1)^{n-1}-(-1)^{n-2}+\cdots-(-1)+1=n(\bmod (x+1))$$

Therefore, $n$ is a multiple of 3. Let $n=3 m$, and set $y=x^{m}$, then
$$3^{k}=y^{3}+1=(y+1)\left(y^{2}-y+1\right)$$

Thus, both $y+1$ and $y^{2}-y+1$ are powers of 3.
Let $y+1=3^{t}$, then from (1) we have
$$3^{k}=\left(3^{t}-1\right)^{3}+1=3^{3 t}-3^{2 t+1}+3^{t+1} .$$

If $t>1$, then $3 t>2 t+1>t+1$, in this case $3^{t+1} \| 3^{3 t}-3^{2 t+1}+3^{t+1}$, comparing both sides of (2) we require $k=t+1$, but in this case the left side of (2) is less than the right side. Therefore, $t=1$, hence $y=2, k=2$. Thus, $(x, k, n)=(2,2,3)$.

In summary, the positive integers $(x, k, n)=(2,2,3)$ satisfy the conditions.