<s>[INST] 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?
 [/INST] 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.
</s>