<s>[INST] Question on the inequality Question.

prove  that if ${ a }_{ 1 },{ a }_{ 2 },...{ a }_{ n }>0$ then $$ \frac { { a }_{ 1 }+{ a }_{ 2 }+...+{ a }_{ n } }{ n } \ge \frac { n }{ \frac { 1 }{ { a }_{ 1 } } +\frac { 1 }{ { a }_{ 2 } } +...+\frac { 1 }{ { a }_{ n } }  } $$ 

Proof 
 $$\\ \left( { a }_{ 1 }+{ a }_{ 2 }+...+{ a }_{ n } \right) \left( \frac { 1 }{ { a }_{ 1 } } +\frac { 1 }{ { a }_{ 2 } } +...+\frac { 1 }{ { a }_{ n } }  \right) =\underset { n\left( n-1 \right) /2\quad terms }{ \underbrace { \left( \frac { { a }_{ 1 } }{ { a }_{ 2 } } +\frac { { a }_{ 2 } }{ { a }_{ 1 } }  \right) +...+\left( \frac { { a }_{ n-1 } }{ { a }_{ n } } +\frac { { a }_{ n } }{ { a }_{ n-1 } }  \right) + } \quad n\ge  } \\ \ge n+2\cdot \frac { n\left( n-1 \right)  }{ 2 } ={ n }^{ 2 }$$
in this  proof i didn't understand  this step "$n\left( n-1 \right) /2\quad ?
terms$" I mean how the number of terms can be $n\left( n-1 \right) /2\quad $ .Can anybody explain it.
Thanks in advance!
 [/INST] $$(a_1+a_2+...+a_n)(\frac{1}{a_1}+\frac{1}{a_2}+...+\frac{1}{a_n})$$ gives clearly $n^2$ terms but each $a_i$ gives $$1+\sum_{i\ne j}\frac{a_i}{a_j}$$ so you have
$$(a_1+a_2+...+a_n)(\frac{1}{a_1}+\frac{1}{a_2}+...+\frac{1}{a_n})=(1+1+...+1)+\sum_{i=1}^{n-1}(\frac{a_i}{a_{i+1}}+\frac{a_{i+1}}{a_i})$$
$$(a_1+a_2+...+a_n)(\frac{1}{a_1}+\frac{1}{a_2}+...+\frac{1}{a_n})=n+\sum_{i=1}^{n-1}(\frac{a_i}{a_{i+1}}+\frac{a_{i+1}}{a_i})$$ Since there are $n^2$ terms in total (you know this, said at the beginning) there are $n^2-n$ fractional terms and $\frac{n^2-n}{2}=\frac{n(n-1)}{2}$ terms each of two fractions inside the parenthesis. This is the explanation you wanted to have.
</s>