You are doing the computation in inexact arithmetic. $11^{16}$ cannot possibly be an even number. In fact, every power of eleven obviously ends in a one.
You're probably doing the computation in doubles. Doubles are only accurate to about fifteen decimal places; after that they round off.
Moreover, you do not need to calculate the whole big number. Use this identity:
$(a \times b) \bmod c$ is congruent modulo $c$ to $(a \bmod c) \times (b \bmod c)$
Make sure that makes sense to you. Take, say, $15$ and $18$, and you want to work out $(15\times 18) \bmod 4$. You could multiply $15$ by $18$ and then divide by $4$ and take the remainder. But think about it like this.
$(15 \times 18) =$
$( (3 \times 4 + 3) \times (4 \times 4 + 2 ) ) =$
$(3 \times 4) \times (4 \times 4) + 3 \times (4 \times 4) + 2 \times (3 \times 4) + 3 \times 2$.
Obviously the first three summands are all divisible by 4, so they go away modulo 4. So
$(15 \times 18) \bmod 4$ is congruent mod 4 to $(15 \bmod 4) \times (18 \bmod 4)$.
Which is equal to $3 \times 2$, so $(15 \times 18) \bmod 4$ is congruent modulo 4 to $(3 \times 2) \bmod 4$, which is a much easier problem to solve.
Do the same thing for powers.
$11^{16} \bmod 17$ is congruent mod 17 to $(11^{8} \bmod 17) \times (11^{8} \bmod 17)$
and the problem is now much easier to solve. Keep going:
$11^{8} \bmod 17$ is congruent $\bmod 17$ to $(11^{4} \bmod 17) \times (11^{4} \bmod 17)$
and now the problem is yet easier. Keep going!
$11^{4} \bmod 17$ is congruent $\bmod 17$ to $(11^{2} \bmod 17) \times (11^{2} \bmod 17)$
And now we have an easy problem to solve. $121 \bmod 17$ is 2, so $11^{4} \bmod 17$ is congruent to $2 \times 2 \bmod 17$. Therefore $11^{4} \bmod 17$ is 4.
$11^{8} \bmod 17$ is congruent $\bmod 17$ to $11^{4} \bmod 17 \times 11^{4} \bmod 17$, so $11^{8} \bmod 17$ is congruent mod 17 to $4 \times 4$, which is 16. Therefore $11^{8} \bmod 17$ is 16.
Similarly, $11^{16} \bmod 17$ is congruent $\bmod 17$ to $16 \times 16$, which is easily determined to be congruent to $1 \bmod 17$.
Therefore $11^{16}$ gives a remainder of 1 when divided by 17. That's a lot easier than doing the big multiplication and the big division, particularly when the numbers get large.
And sure enough, we got one, so that is evidence that 17 is prime.
So you have $n-1$ in the form $2^{\alpha}\cdot d$ where $d$ is odd, then $n$ is composite if there exists any $a \leq n-2$ such that for all $\beta \in [0,\alpha-1]$ we have
$$a^{2^{\beta}\cdot d} \not\equiv 1, -1 (\text{mod } n)$$
The modular exponentiation comes in when we calculate the first test, $a^{2^{0}\cdot d}$. In your example you have to calculate $32^{85}$ modulo $341$.
What is nice is that after that for any $\rho$ we can get $a^{2^{\rho}\cdot d}$ by squaring the previous test value $a^{2^{\rho-1}\cdot d}$. In your case this doesn't really come into play as your $\alpha$ is only $2$, so we only need to test for $\beta = 0,1$. If you had a different $n$, then $\alpha$ might be a lot larger, and you'd end up doing a lot of modular arithmetic.
In your case though, you've found an $a$ which suggests that $n$ might be prime. However if $n$ is composite, then at most $\frac{1}{4}$ of the possible values for $a$ would give a result suggesting primality (a false positive). So based on this one test, you could declare $341$ is prime with only a $25\%$ chance you are wrong.
What you would do in practice is pick $k$ different values for $a$, then declare $n$ to be prime only if all of them pass the test (if any fails, then $n$ is definitely composite). Then you have only a $4^{-k}$ chance of being wrong.
Best Answer
The weak Fermat-pseudoprime-test is a good start, but there are infinite many composite numbers passing the test for every base coprime to the number, namely the Carmichael numbers.
However, if your number is large (say $100$ digits or more), and if it is a "random number" (no special form) and you choose a random base, the probability that the number is prime is already very high if the number passes the test.
The strong-Fermat-pseudoprime-test is much better. If a number passes the test with $N$ random bases, the probability that it is a composite number is at most $(\frac{1}{4})^N$. If the number fails the test, it must be composite.
If you want to be absolutely sure that a number is prime, either use the Adleman-Pomerance-Rumely-test (APR) or Elliptic-Curve-Primality-Proving. The APR-test is implemented in most programs with long-integer-arithmetic, for example in PARI/GP.