「Old Article」笔记:费马质数检验算法

按:这篇文章写于2018年11月27日

An Algorithm for detecting prime number (Primality Test)

1. Fermat’s Little Theorem and its converse-negative proposition
  • Fermat’s Little Theorem is introduced:If ​ is an integer, and ​ is a prime number, then ​ must be one of multiples of ​Which means that: ​Then we have:​ Then the commonly used format is:​
  • If Fermat’s Little Theore