Source: http://www.panamaths.net/Documents/TS_SPE/DivisibiliteCongruences (Exercices) V082012.pdf