Source: http://maths.ac-creteil.fr/IMG/pdf/3.arithmetique.feuilleexercices-2.pdf