# I am looking for a proof of a certain set being divisible by 7

I am looking for a proof of this statement:

$$7\mid{3^{6k+2}-{2^{6k+1}}}$$

By trial and error I can see that it holds but I cant figure out anyway to prove it or cant seem to be able understand why.

Any tips and help would be appreciated.

• Hint. Write out the first few powers of $2$ and $3$ modulo $7$ and look for patterns. – Ethan Bolker Apr 19 '19 at 12:55
• Did you try induction? If the claim holds for $k$, can you see why it holds for $k+7$? – Hagen von Eitzen Apr 19 '19 at 12:55
• You can also use Fermat's little theorem – Peter Apr 19 '19 at 12:56
• thank you all for all your valuable input – Ali Nuri Şeker Apr 19 '19 at 13:16

HINT: Write your term in the form $$(729)^k\cdot 9-(64)^k\cdot 2$$ and $$729\equiv 1\mod 7$$ and $$64\equiv 1 \mod 7$$ so we get $$729^k\cdot 9-64^k\cdot 2\equiv 1^k\cdot 9-1^k\cdot 2\equiv 9-2=7\equiv 0 \mod 7$$

Since, by Fermat's little theorem, $$3^6\equiv1\pmod7$$ and $$2^6\equiv1\pmod7$$, then$$3^{6k+2}-2^{6k+1}=(3^6)^k\times9-(2^6)^k-1\equiv2-1=1\pmod7.$$

For $$k=0$$ we can actually verify that $$7|3^2-2$$.

Suppose that $$3^{6k+2}-{2^{6k+1}}$$ is divisible by $$7$$ for $$k=n$$. Then for $$k=n+1$$, $${3^{6k+2}-{2^{6k+1}}}=3^{6n+8}-{2^{6n+7}}=3^6(3^{6n+2}-2^{6n+1})+(3^6-2^6)\times2^{6n+1}\\=3^6(3^{6n+2}-2^{6n+1})+7\times 95\times2^{6n+1}.$$ Both terms above are devisible by $$7$$.

The proof is now complete if you know the induction principal.

$$3^{6k+2}=(3^2)^{3k+1}=2^{3k+1}\mod 7$$

$$2^{6k+1}-2^{3k+1}=2^{3k+1}(2^{6k+1-3k-1}-1)=2^{3k+1}(2^{3k}-1)$$

$$2^{3k}-1=8^k-1=0\mod 7$$