Parallel recursion for calculation