Source: https://bioinfo.mnhn.fr/abiens/ISUP5G3/docu/5_Recursion.pdf