Finding all positive integers $x,y,z$ that satisfy $2^x=3^y7^z+1$ 
Find all positive integers $x,y,z$ that satisfy  $$2^x=3^y7^z+1$$.

I think that $(x,y,z)=(6,2,1)$ is the only solution, But how can I prove this?
 A: If we allow $y$ and $z$ to be zero, this can be rephrased as: 

For which positive integers $x$ is $2^{x} - 1$ is not divisible by any prime other than $3$ or $7$?

Call the set of such integers $S$.
Suppose $x \in S$. If $t$ divides $x$, then $2^{t} - 1$ divides $2^{x} - 1$, so $t \in S$ as well.
$3$ divides $2^{x} - 1$ iff $x$ is even, and $7$ divides $2^{x} - 1$ iff $x$ is divisible by 3. So we see that if $x \in S$, we must have either $x$ even, $x$ divisible by 3, or $2^{x} - 1 = 1$, i.e. $x = 1$. 
Then if $x \in S$ has a prime factor $p$, $p \in S$, and so we must have $p = 2$ or $p = 3$.
Finally, we see $2^{4} - 1 = 15$ and $2^{9} - 1 = 511$, hence $4$ and $9$ are not in $S$, so no element of $S$ is divisible by $4$ or $9$. The only remaining integers are $1,2,3,6$. We can check $2^{1} - 1 = 1$, $2^{2} - 1 = 3$, $2^{3} - 1 = 7$, and $2^{6} - 1 = 63 = 3^{2} \cdot 7$. So $S = \{1,2,3,6\}$.
Finally, $x = 6$ is the only one which gives $y,z$ positive.
A: We have to show that for $x\ge 7$, the number $2^x-1$ has a prime divisor different from $3$ and $7$. 
If $x$ has a prime factor $p\ge 5$, then $2^p-1$ divides $2^x-1$ and all prime factors of $2^p-1$ must be of the form $2kp+1$, hence there must be a prime factor greater than $7$. 
Otherwise $x$ must be divisible by $4$ or by $9$ , hence $2^4-1$ or $2^9-1$ must divide $2^x-1$. This implies that $5$ or $73$ must be a prime factor. Since $x<6$ gives no solution, in fact $x=6$ is the only one.
A: The equation $2^x=m 3^y7^z+1$ can have infinitely many solutions;
We use Fermat little theorem; for primes p and q we may write:
$2^{p-1} ≡ 1 \ mod p$ ⇒ $2^{ k p}≡ 1 \mod p$
$2^{q-1} ≡ 1 \ mod q $⇒ $2^{k q}≡ 1 \mod q$
If $p=7 $ we have:
$2^{7-1}=2^6  ≡ 1 \ mod 7$ ⇒ $2^{6 k_1}≡ 1 \mod 7$
For $p=3$ we have:
$2^{3-1}=2^2 ≡ 1 \mod 3$  ⇒ $2^{2 k_2}≡ 1 \mod 3$
Therefore:
$2^{6k}≡ 1 \mod 3\times 7$
That is one set of solutions for equation $2^x=m 3^y7^z+1$is: $(x, y, z)=(6k, 1, 1); k ∈ N$
Also we can see that $2^{6k}≡ 1 \mod 3^2 \times 7$, that is another set of solutions of equation $2^x=m 3^y7^z+1$ is:$(x, y, z)=(6k, 2, 1); k ∈ N$
Here m=1, then equation is $2^x= 3^y7^z+1$, the minimum value of x is when $k=1$ so $x=6$ and we have:
$2^6 -1 =3^y 7^z$ which its only solution is:(x,y,z)=(6,2,1) wich is a member of second set of solutions.
A: Looking at the equation mod $7$ we see that $2^x = 1 \pmod 7$ which means $3 \mid x$ by Lagrange's theorem. Looking at the equation mod $3$ we see that $(-1)^x = 1 \pmod 3$ so $x$ is even.
Hence there is a positive integer $k$ such that $x = 6k$.
Rewrite the equation as $2^{6k} = 3^y7^z + 1$, which can also be written as $(2^k-1)(2^k+1)(2^{2k}+2^k+1)(2^{2k}-2^k+1)= 3^y7^z$
obtained by factoring the polynomial $X^6 - 1$.
If $k \gt 0$ then:
$\gcd(2^k - 1, 2^k + 1) = \gcd(2^k + 1, 2) = 1$,
$\gcd(2^k-1, 2^{2k}-2^k+1) = \gcd(2^k - 1, 2^{2k}) = 1$, and
$\gcd(2^k+1, 2^{2k}-2^k+1) = \gcd(2^k+1, 2^{k+1}-1) = \gcd(2^k + 1, 3) = 1$ or $3$.
Note that if all $3$ pairs were coprime then one of $2^k-1$, $2^k+1$ or $2^{2k}-2^k+1$ would need to be equal to $1$ since $3^y7^z$ has only two distinct prime factors. But for $k \gt 0$ the last two are always greater than $1$ so we have $2^k-1 = 1$ or $k = 1$.
This gives $x = 6$ and $3^y7^z = 3\cdot7\cdot3 = 3^27^1$ so we get $(x, y, z) = (6, 2, 1)$.
Otherwise we have $\gcd(2^k + 1, 2^{2k} - 2^k + 1) = \gcd(2^k + 1, 3) = 3$, in which case we can divide by $3^2$ to obtain $(2^k-1)\frac{2^k+1}{3}(2^{2k}+2^k+1)\frac{2^{2k}-2^k+1}{3} = 3^{y-2}7^z$ where now $2^k-1$, $\frac{2^k+1}{3}$ and $\frac{2^{2k}-2^k+1}{3}$ are pairwise coprime.
Proceeding as above, this means one of them must be one. We already saw the case $k = 1$ previously, and there are no other ways to make these equal to $1$.
