How reliable is the weak Fermat-test for base $2$ for large numbers , for example $100$-digit-numbers?

171 Views Asked by At

Let $N$ be a $100$-digit odd random number. Suppose , $$2^{N-1}\equiv 1\mod N$$

How large is approximately the probability that $N$ is composite ?

In other words : How reliable is the weak-fermat-test to base $2$ for large numbers, for example $100$-digit-numbers ?

What we need is the estimation of the number of weak pseudoprimes to base $2$ in the interval $[10^{99},10^{100}]$, but I have no clue how to get such an estimation.

We should get a very small probability that $N$ is composite.

A generalization would be nice to see how fast the probability decreases with increasing number of digits.

I found some data relating to the question here : http://primes.utm.edu/notes/prp_prob.html

The difference to my question is that I do not choose a random base.