Consider a divergent series that tends to infinity such as $1+\frac{1}{2}+\frac{1}{3}+\frac{1}{4}+\cdots$. The limit of this series is unbounded, and I have often seen people say that the sum 'equals infinity' as a shorthand for this. However, is it acceptable to write $1+\frac{1}{2}+\frac{1}{3}+\frac{1}{4}+\cdots = \infty$ in formal mathematics, or is it better to denote that the limit is equal to infinity? If so, how does one do this?