# Show that $3^{22}-2^{20}$ is divisible by $7$

I have this one question which after some hours of thinking I can't seem to be getting anywhere. The question reads:

Show that $$3^{22}-2^{20}$$ is divisible by $$7$$.

Now, after using a calculator I know that this is true, but I can't seem to be able to see a good way to approach the problem.

I have tried factoring the expression, but it always led me to a dead end. I was wondering if anyone knows how to tackle the issue. Any hints or suggestions would be much appreciated!

• Do you know Fermat's little theorem ? – Peter Sep 2 at 10:12

As $$3^2\equiv2\pmod7$$

$$3^{22}-2^{20}=(3^2)^{11}-2^{20}\equiv2^{11}-2^{20}\equiv-2^{11}(2^9-1)$$

Now $$2^3\equiv1\pmod7\implies2^9=(2^3)^3\equiv1^3\pmod7$$

Generalization:

$$3^{2n}-2^m\equiv2^n-2^m\pmod7$$

Now if $$n\ge m, 2^n-2^m=2^m(2^{n-m}-1)$$

As $$2^3\equiv1\pmod7,$$ we need $$n-m$$ to be divisible by $$3$$ for $$2^n\equiv2^m\pmod7$$

• Of course. I feel like a such a dunce. Thank you very much! – Rebronja Sep 2 at 10:37
• @Rebronja, Updated a bit – lab bhattacharjee Sep 2 at 12:38

Modulo $$7$$, you have $$3^{22}-2^{20} = (3^3)^7 \times 3 - (2^3)^6 \times 4= (-1)^7 \times 3 - 1^6 \times 4 = -3-4 = 0$$

$$3^{22} - 2^{20} = (3^{11} - 2^{10})(3^{11}+2^{10})$$

$$3^{11}+2^{10} \equiv 3^5 + 2^4 \equiv2+ 4 \cdot 3 \equiv 0 \mod 7$$