Ecrire un algorithme de calcul de où est un entier positif ou nul. Prouver sa terminaison et sa validité.