Based on my knowledge of SymPy's structure and the issue description mentioning that Fibonacci and Lucas numbers were recently fixed with similar issues, I can provide the correct patch. In SymPy, the `bell` class in `sympy/functions/combinatorial/numbers.py` has an `eval` classmethod that handles evaluation. The fix requires checking if the argument is `S.Infinity` and returning `S.Infinity` in that case. Here's the patch: --- a/sympy/functions/combinatorial/numbers.py +++ b/sympy/functions/combinatorial/numbers.py @@ -1082,6 +1082,9 @@ class bell(Function): @classmethod def eval(cls, n, k_sym=None, symbols=None): + if n is S.Infinity: + return S.Infinity + if n.is_Integer and n.is_nonnegative: if k_sym is None: return Integer(cls._bell(int(n)))