I always write $\mathcal{O}(n)$ (\mathcal{O}(n)
). But I frequently see $O(n)$ (O(n)
), probably because it's shorter and more convenient to type.
To me, $\mathcal{O}$ makes more sense because it's a set, and sets are frequently written with calligraphic notation (especially sets of sets, such as sets of functions, such as $\mathcal{O}$).
What is the "right" usage? Is there one?
(Of course, in my $\sf\LaTeX$ documents, I define a \newcommand\bigO{\mathcal{O}}
for semantic markup, but that's beside the point here.)