Source: https://www.math.u-psud.fr/~perrin/CAPES/arithmetique/EntiersCAPES.pdf