I have seen many recursive functions(mostly used in computing some mathematical operations e.g. factorial, sum of the digits in a number, etc…) which involve use of a static variable which holds the result of the each recursive call/operation, and uses it for the subsequent calls.
So does that make recursive functions non-rentrant and not thread-safe.
Are there other use-cases of recursive functions which does not need static variables?
Of course. In fact, static variables in recursive functions should be the exception, not the rule:
Those were quite frankly bad implementations. Static variables are absolutely not needed here. They probably served as accumulators; this can be done better by passing the accumulator around as an extra argument.