Source: https://www.univers-ti-nspire.fr/files/pdf/04-arith-pgcd-TNS21.pdf