Source: https://irem.univ-reunion.fr/IMG/pdf/5-Une_suite_en_algorithme.pdf