How to generalize the following operation in one mathematical equation I'm trying to generalize the following formulations : 
$$score_1=\frac{\sum_{j=1}^{3}FN(v_1,s_1)+FN(v_1,s_2)+FN(v_1,s_3)}{3}$$
$$score_2=\frac{\sum_{j=1}^{3}FN(v_2,s_1)+FN(v_2,s_2)+FN(v_2,s_3)}{3}$$
I have tried the following equation :
lets say N=4
While  1 <= i <= N
$$score_i=\frac{\sum_{j=1}^{k}FN(v_i,s_j)}{k}$$
is my approach right ?
 A: Hint: It seems the expressions $score_1$ and $score_2$ do not really match what you had in mind. Nevertheless taking it verbatim we obtain
\begin{align*}
score_1&=\frac{\sum_{j=1}^{3}FN(v_1,s_1)+FN(v_1,s_2)+FN(v_1,s_3)}{3}\\
&=\frac{3FN(v_1,s_1)+FN(v_1,s_2)+FN(v_1,s_3)}{3}\tag{1}\\
&=FN(v_1,s_1)+\frac{1}{3}\sum_{j=2}^3FN(v_1,s_j)\tag{2}\\
score_2&=FN(v_2,s_1)+\frac{1}{3}\sum_{j=2}^3FN(v_2,s_j)\tag{3}\\
\end{align*}

We generalise (1) and (3) by iterating  the  first  argument $v_i (1\leq i \leq N)$ and taking $k\geq 1$ as upper index of the sum.  We  obtain
  \begin{align*}
score_i&=FN(v_i,s_1)+\frac{1}{k}\sum_{j=2}^kFN(v_i,s_j)\qquad\qquad 1\leq i\leq N, k\geq  1\tag{4}
\end{align*}

Comment:


*

*In (1)  the scope  of   the  sum encloses  the  term     $FN(v_1,s_1)$  but no other terms.  Since this term does not depend on the index $j$ and is treated as a constant according to   the rule $\sum_{j=1}^n a=a\sum_{j=1}^n  1 =n\cdot a$.

*In  (2) we  simplify the expression somewhat.

*In (3) we collect the terms besides the left-hand one in a sum.

*In (4) observe, that   in  case $k=1$ we have  $\sum_{j=2}^\color{blue}{1}FN(v_i,s_j)=0$,   since the upper limit  $1$ of the sum is less than the lower limit $2$. 

Hint: To me it seems you had something different in mind, namely
\begin{align*}
score_1&=\frac{FN(v_1,s_1)+FN(v_1,s_2)+FN(v_1,s_3)}{3}\\
&=\frac{1}{3}\left(FN(v_1,s_1)+FN(v_1,s_2)+FN(v_1,s_3)\right)\\
&=\frac{1}{3}\sum_{j=1}^3FN(v_1,s_j)\\
score_2&=\frac{1}{3}\sum_{j=1}^3FN(v_2,s_j)\\\\
\end{align*}
The generalisation gives now
\begin{align*}
\color{blue}{score_i}&\color{blue}{=\frac{1}{k}\sum_{j=1}^kFN(v_i,s_j)\qquad\qquad 1\leq i\leq N,\ k\geq 1}
\end{align*}

If  for      instance    (4)  is  not that clear,  a helpful,  thorough exposition of how   to  work with sums is presented in   chapter 2: Sums , section 2.1 Notation in Concrete Mathematics
by R.L. Graham, D.E. Knuth and O. Patashnik.
A: The first two expressions are written without $\sum _{j=1}^3$ (because they're already written explicitly). The expression $\mathrm{score}_i$ is correctly written.
If we specify what $i$ is, we usually say "for all $i$ such that $1\leq i\leq N$" or just "for $1\leq i\leq N$". While $1\leq i \leq N$ is totally acceptable in my eyes, but opinions may vary on this.
Take care to not overload your notation. For instance, at the moment I'm detecting $N$ and $N(x,y)$ or is it $FN(x,y)$?
