Source: http://fr.maths.free.fr/maths/gf/cours_pdf/3eme/arithmetique.pdf