The convention is to not present equations in text but in numbered equations set off from the text. Only explain the symbols in text, e.g.
We added the number of women to the number of men to calculate the total number of persons:
m + f = p (1)
where m is the number of men, f is the number of women, and p is the total number of persons.
In your case, where you don't give a complex equation but simply present the value of a variable, giving it in text is perfectly fine. I would simply rephrase your example a bit:
We choose an index of n = 5.
Use past tense ("chose") when you report what you have done and present tense ("choose") if you write a textbook instructing students what to do.
In general, the convention is to write words in text and to display equations, symbols, and numbers in figures, tables, or equations set off from the text. Number your equations, figures, and tables, so that you can refer to them in text, e.g.
We choose an index of 5 (see equation 1).
n = 5 (1)