In David Tong's lecture notes on general relativity (page 12) he denotes Minkowski spacetime as $\mathbb{R}^{1,3}$. Also, on Wikipedia, I found that both $\mathbb{R}^{1,3}$ and $\mathbb{R}^{3,1}$ are used and the choice depends on the metric signature used, $(-,+,+,+)$ or $(+,-,-,-)$. I think $\mathbb{R}^{1,3}$ is associated with $(-,+,+,+)$ since this is the signature Tong uses in his GR lectures, which would leave $\mathbb{R}^{3,1}$ to be associated with $(+,-,-,-)$.
What is the link between these? That is, what is the significance of the order of the coefficients? Does the first coefficient denote the number of negatives in the signature and the second number denote the number of positives? Or, is there some other, possibly deeper, meaning? Is this notation used in pure math too, or is it simply a notation introduced by physicists for this purpose?