formula recursion solved