next up previous contents
suivant: Test de non primalité monter: Introduction précédent: Algorithme naïf   Table des matières

théorème de Fermat

Soient $ p \in \{premiers\},\; a \in \mathbb{Z}$ :

$\displaystyle p \nmid a \Rightarrow a^{p-1} \equiv 1 \;(mod\; p) \Leftrightarrow a^{p} \equiv a \;(mod\; p).$    

Attention : la réciproque est fausse, en effet $ 2^{340} \equiv 1 \;(mod\; 341)$ mais $ 341$ n'est pas premier.



vincent 2006-04-29