Could you help me answering this question?

For which Mersenne primes and Fermat primes is 2 a primitive root?

I know that a $a$ is a primitive root modulo $n$ if $a$ generates $\mathbb{Z}\_n^\*$.

A Mersenne prime is a prime of the form $M\_p=2^p-1$, with $p$ prime. 

A Fermat prime is a prime of the form $2^{2^n}+1$, with $n\in \mathbb{N}$.

Thank a lot :)