How can I calculate the remainder of $3^{2012}$ modulo 17? So far this is what I can do:
Using Fermat's Little Theorem I know that $3^{16}\equiv 1 \pmod {17} $
Also: $3^{2012} = (3^{16})^{125}*3^{12} \pmod{17}$
So I am left with $3^{12}\pmod{17}$.
Again I'm going to use fermat's theorem so:  $ 3^{12} = \frac{3^{16}}{3^{4}} \pmod{17}$ 
Here I am stuck because I get $3^{-4} \pmod{17}$ and I don't know how to calculate this because I don't know what $\frac{1}{81} \pmod{17}$ is. 
I know $81 = 13 \pmod{17}$ 
But I know the answer is 4. What did I do wrong?

Just do it.  
$3^4 = 81 \equiv -4$.
$3^{12} \equiv (3^4)^3 = (-4)^3 \equiv -81 \equiv 4 \mod 17$.
For insight:
You know $3^{16}\equiv 1 \mod 17$ so $3^{8}\equiv \pm 4$ so $3^4 \equiv \pm 1, \pm \sqrt{-1}$.  So $-1 \equiv 16$ one of the $\sqrt {-1} \equiv 4\mod 17$.  (the other is $13$).    This should tell you to try to find $3^{12}$ via iterations $3^4$.
Also: $81 \equiv 13 \equiv - 4 \mod 17$.  So $\frac 1{81} \equiv -\frac 14$. And figuring $\frac 14$ shouldn't be hard $1 \equiv 18$ so $\frac 12 \equiv 9 \mod 17$ and $9 \equiv 26$ so $\frac 14 \equiv 13\equiv -4$. So $-\frac 14 = 4$.  And that makes sense.  $(-4)*4 = -16 \equiv 1 \mod 17$.
