prove that $2^{3n}\equiv 1$ (mod 7) for every integer $n>0$ I used the little Fermat Theorem to write
$$2^7\equiv 2 \ \ \ (\mbox{mod} \ 7) \Rightarrow 2^6\cdot2\equiv 2 \ \ \ (\mbox{mod} \ 7)
$$
$$2^{2\cdot3}\equiv 1 \ \ \ (\mbox{mod} \ 7)$$
Raising to $m$-th power, $m>0$, I got
$$2^{2\cdot3m}\equiv 1 \ \ \ (\mbox{mod} \ 7)$$
And now changing $2m$ by $n$. Did I do something wrong? 
 A: Fermat's little theorem states that if $p$ is a prime number, then for any integer $a$, the number $a^p-a$ is an integer multiple of $p$. In the notation of modular arithmetic, this is expressed as
$$a^p \equiv a \pmod p.$$
If $a$ is not divisible by $p$, Fermat's little theorem is equivalent to the statement that $a^{p − 1} − 1$ is an integer multiple of $p$, or in symbols:
$$a^{p-1}\equiv 1 \pmod p.$$
Since, for any $n > 0$, $2^n$ is not divisible by $7$ we have $(2^n)^6\equiv 1 \pmod 7$, i.e., 
$$2^{3n}2^2\equiv 1 \pmod 7.\quad (*)$$
You have shown that for any EVEN $k$, $2^k\equiv 1 \pmod 7$, then $(*)$ becomes
$$2^{3n}\equiv 1 \pmod 7.$$
A: You can also use induction.
Base case: $(n=1)$:
$2^3 = 8 \equiv 1 \mod 7$. OK.
Induction step:
Assume that $2^{3k}\equiv 1 \mod 7$ for some positive integer $k$.
Then $2^{3(k+1)} = 2^{3k}\times 2^3 \equiv 1 $ (by hypothesis) $\times 8 = 8 \equiv 1 \mod 7$.
A: Yes, by "changing $\,2m\,$ to $\,n$" $ $  you assume $\,n\,$ is even, so your argument is incomplete since it doesn't handle the case $\,n\,$ is odd. To fix it, using (only) little  $\rm\color{#0a0}{\rm Fermat}$ (as you require) we can do
$\quad\!\bmod 7\!:\,\ \color{#c00}{2\equiv 3^{\large 2}}\Rightarrow\, \color{#c00}2^{\large 3n}\!\equiv (\color{#c00}{3^{\large 2}})^{\large 3n}\!\equiv (\color{#0a0}{3^{\large 6}})^{\large n}\!\equiv \color{#0a0}1^{\large n}\!\equiv 1\ $ by the Congruence Power Rule
Remark $\ $ More generally by Euler's Criterion we have
$$p\nmid a\ \Rightarrow\ a^{\large (p-1)/2} \equiv \begin{cases}\ \ \  1,\ \,\text{if $\,a\ \ $ is $\ \ $ a square $\!\pmod{\! p}$} \\ -1,\ \, \text{if $\,a$ isn't a square $\!\pmod{\! p}$} \end{cases}\qquad$$
If - as above - we know which case holds then we can use the criterion to reduce the Fermat exponent by a factor of $\,2\,$ when applying modular order reduction, which may (greatly) simplify computations. As mentioned in the link on the criterion, we can efficiently algorithmically determine which case holds using Legendre symbols and quadratic reciprocity, so this optimization of little Fermat is generally applicable once one knows these methods.
A: Simple:
$$
2^{3 n}
  = 8^n
  \equiv 1^n \pmod{7}
$$
