Lets say I have some numbers:
[1, 3, 5, 1, 10, 8]
What is the proper mathematical notation for the following operation?
$$ (1-3) + (3-5) + (5-1) + (1-10) + (10-8) $$
Here is what I was trying:
$$ \sum_{i=1}^{N} p_i - p_j$$
Is this correct? If now, what is the best way to write this?