Perfect powers in the solutions of a certain Pell equation The fundamental solution of the Pell equation $$x^{2}-3y^{2}=1$$ is $2+\sqrt{3}$.
It seems that if $x_{n}+y_{n}\sqrt{3}$, $x_{n}, y_{n} \in \mathbb{N}$, is a solution of the said Pell equation and $x_{n}$ is a power of $7$, then $n=2$. (UPDATE: As the user Gerry Myerson mentioned last night, $x_{n}$ and $y_{n}$ are the natural numbers defined by $x_{n}+y_{n}\sqrt{3} = (2+\sqrt{3})^{n}$; if after reading the previous remark it is not apparent how it is that the equality allows one to define both $x_{n}$ and $y_{n}$, please take a look at any text on number theory that discusses the Pell equation.)
Simple congruence arguments allow us to conclude that such an $n$ can't be either an odd natural number or divisible by $4$.
Do you see a nice way to show that $n$ cannot be congruent to $2$ modulo $4$ unless $n=2$?
In general, what are the results with which somebody interested in determining all the solutions $x_{n}+y_{n}\sqrt{d}$ of the Pell equation $x^{2}-dy^{2}=1$, subject to the additional constraint that either $x_{n}$ or $y_{n}$ be a non trivial perfect power, must be armored?
To be 100% honest, I posed this question in http://math.stackexchange.com earlier today, but I am afraid that it might actually belong here.
Thank you very much for your knowledgeable replies.
 A: If you consider the Ljunggren-Nagell theorem "elementary" (see On a result attributed to W. Ljunggren and T. Nagell), then there is an elementary proof in your case. You ask about 
$$ 7^{2m} = 1 + 3y^2.$$
Clearly $y$ is even, say $y = 2u$. Then the equation can be rewritten in the form
$$\frac{7^m-1}{6} \cdot (7^m+1) = 2u^2.$$
Since $(7^m+1)-(7^m-1)=2$, the gcd of the two left-hand factors divides $2$. By unique factorization, each of the two left-hand factors is either a square or twice a square. 
If $m$ is odd, the first left-hand factor is odd. So 
$$ \frac{7^m-1}{6}= \square, \quad \text{which comparing with the last display forces}\quad 7^{m}+1 = 2\square. $$
If $m$ is even, both $(7^m-1)/6$ and $7^m+1$ are even. Moreover, $7^m+1 \equiv 2\pmod{4}$ --- hence, cannot be a square, so must be twice a square. Looking back at the displayed equation from the last paragraph, we see that again, $(7^m-1)/6=\square$. By Ljunggren's theorem, the only solutions to $(7^m-1)/6=\square$ are $m=1$ and $m=4$. But only $m=1$ is compatible with the condition $7^m+1=2\square$.
A: I consider that an answer for the second question is recurrence relations for solutions of Pell's equations. In point of fact, by resorting to them I am going to prove below the OP's original conjecture.
Dem. Since $2+\sqrt{3}$ is the fundamental solution to $x^{2}-3y^{2}=1$, the general solution $x_{r}+y_{r}\sqrt{3}$ in positive integers for the equation is given by
$$ x_{r}+y_{r}\sqrt{3} = (2+\sqrt{3})^{r}$$
where $r \in \mathbb{Z}^{+}$.
By equating the "rational parts" in the previous equality, we obtain the general recurrence relations:
$$x_{r+s} = x_{r}x_{s}+3y_{r}y_{s}, \qquad y_{r+s} = x_{r}y_{s} + y_{r}x_{s}.$$
By combining these relations and taking into account that $x_{1}=2$ and $x_{2}=7$, we obtain the following recurrence relation for the $x$ "components" of the solutions to $x^{2}-3y^{2}=1$:
$$x_{1}=2, \qquad x_{2}=7, \quad \mbox{and} \quad x_{t+2} = 4x_{t+1}-x_{t} \quad \mbox{for any} \quad t \in \mathbb{Z}^{+}.$$
Given that we are interested in determining when it is that an element of the sequence $x_{1}, x_{2}, x_{3}, \ldots$ is a power of $7$, we analyze that sequence modulo $7^{2}$. As it turns out, the sequence $$x_{1} \bmod{7^{2}}, \, x_{2} \bmod{7^{2}}, \, x_{3} \bmod{7^{2}}, \, \ldots$$ has period $56$ and, what is more, we observe that $x_{j} \bmod{7^{2}} = 0$ iff $j \equiv 13 \pmod{56}$ or $j \equiv 41 \pmod{56}$. Since it is also the case that the sequence $x_{n} \bmod{337}$ has period $56$ and that $x_{j} \bmod{337} = 0$ iff $j \equiv 13 \pmod{56}$ or $j \equiv 41 \pmod{56}$, we conclude that the only power of $7$ in the sequence $x_{1}, x_{2}, x_{3}, \ldots$ is $x_{2}=7$. Q.E.D.
I believe that this proof is more or less related to what user znt hinted at in his/her comment; however, my main reference while putting it together was not Cassels' book on local fields but G. N. Copley's article "Recurrence relations for solutions of Pell's equations" (Amer. Math. Monthly, vol. 66 (1959), no. 4, pp. 289-290.). Furthermore, I determined the period of the sequences $\{x_{n} \bmod 7^{2}\}_{n \in \mathbb{Z}^{+}}$ and $\{x_{n} \bmod 337\}_{n \in \mathbb{Z}^{+}}$ with the aid of Mathematica.
A: The standard appproach is via Baker's method of linear forms in logarithms. We have $x_n+\sqrt{3}y_n=(2+\sqrt{3})^n$, thus $2x_n=(2+\sqrt{3})^n+(2-\sqrt{3})^n$. Now assume that $x_n=7^m$, and consider $\Lambda=\log 2+ m\log 7-n\log(2+\sqrt{3})$. Then $\Lambda\neq 0$, since $(2-\sqrt{3})^n\neq 0$, but $\Lambda$ is very small. More precisely we have
$$
0<\Lambda = \log\frac{2\cdot 7^m}{2\cdot 7^m-(2-\sqrt{3})^n} < \frac{0.27^n}{7^m}
$$
Baker proved a lower bound for arbitrary integral linear combinations of logarithms of algebraic numbers, see e.g. https://www.birs.ca/workshops/2012/12ss131/files/bugeaud_LFL.pdf . We get
$$
\log|\Lambda|> -C\log\max(n+1,m+1),
$$
where $C$ depends on the number of summands in the linear form (in our case 3), the size and and algebraic structure of the summands, but is completely explicit (see (1.2) in the paper by Bugeaud). In our case we get $C<10^{16}$. Comparing these bounds we get an upper bound for $n$. Checking the remaining range is non-trivial, but often possible using methods from diophantine approximation.
A: I will add my answer here too. :-). I made some mistakes in the first try.
We know $x_n + y_n\sqrt{3} = (2+\sqrt{3})^n$. If $n=4k+2$ for some $k\ge 0$, then $$x_n + y_n\sqrt{3} = (2+\sqrt{3})^n = (7+4\sqrt{3})^{2k+1}, $$
which implies that $$x_n = \sum_{i=0}^{k}C(2k+1, 2i) 7^{2k+1-2i}(4\sqrt{3})^{2i} = \sum_{i=0}^{k}C(2k+1, 2i) 7^{2k+1-2i}48^i$$
We need to consider how many factors of $7$ each $C(2k+1, 2i)$ contains. I don't have time now and will claim that: if $7^\alpha || 2k+1$, we have $7^{\alpha + 1} \mid 7^{2k-2i}C(2k+1, 2i)$ for $0\le i<k$. The proof uses the factors of a prime in a factorial expressed in the sum of floor functions. 
If the claim holds, then $7^{\alpha + 2}$ divides all terms but the last one.
Claim:  $m>n>0$, $p$ is a prime number, $\alpha >0$ such that $p^\alpha || m$ (that is, $p^\alpha \mid m$ and $p^{\alpha+1} \nmid m$). If $p^\beta || C(m, n)$, then $\beta \ge \alpha - s$, where $s\ge 0$ and $p^s \le n$ and $p^{s+1} < n$.
Proof of claim:
    $$\beta =\sum_{i=1}^{\infty} ([\frac{m}{p^i}] - [\frac{n}{p^i}] - [\frac{m-n}{p^i}])$$
Each term in the summation contributes $0$ or $1$. If $n=1$,  the first $\alpha$ terms contribute $1$ each; for general $n$, except the first $s$ terms, the contribution of each term is at least as good as in $C(m, 1)$. 
A: Yet another approach to solving $7^{2m} - 3y^2 = 1$ is to reduce it to Mordell equations:
$$Y^2 = X^3 - 3^3 7^{2k},$$
where $k:=2m\bmod 3$, $\ Y:=3^2 7^k y$, and $X:=3\cdot 7^{k+\lfloor 2m/3\rfloor} x$.
Solutions to these three Mordell equations (indexed by $k\in\{0,1,2\}$) are readily available:

*

*$k=0$: $(X,Y) = (3,0)$, giving $(m,y)=(0,0)$

*$k=1$: no solutions

*$k=2$: $(X,Y) = (147,\pm 1764)$, giving $(m,y)=(1,\pm 4)$.

