I am writing a program for an assignment in which I need to incorporate these two formulas; but, the problem is, I have no understanding of the formatting of these formulas and I am just at a loss with what I could find online.
Maybe the question I should be asking is, "What kind of formatting is being used for those formulas and what does each part mean?"
I apologize for lack of clarity and for my confusion -- I've been dealing with trying to figure this out for weeks, on and off, and use Stack Exchange as a last resort.
Below is a screenshot attachment.
Edit: And I did see this other post, but it confuses me. I haven't made it that far in math.

In mathematics, $\sum$ often means "sum", and the term
$$\sum_{i=1}^n a_i$$
is read as "the sum of all $a_i$ where $i$ goes from $1$ to $n$, in other words
$$\sum_{i=1}^n a_i = a_1 + a_2 + \cdots + a_n$$