I require converting this for loop into a recursion function

welcome to shbcf.ru