This is LaTeX code:

[latex]
p:=n-\frac{r\left(r-1\right)}{2}
[/latex]