Calculating harmonic mean of $f(i)$, where $f(i)$ represent the number of times the number $i$ is selected. $i \in \{1,2,3\}$. 
Let $X =\{ 1,2,3 \}$. A number is selected from the set $X$ with replacement and this process is repeated $1100$ times. For each $i,i \in \{1,2,3\}$, let $f(i)$ represent the number of times the number $i$ is selected. Also, let $S$ denote the total sum of $1100$ numbers selected. If $S^3 = 162 f(1)f(2)f(3)$. What will be the harmonic mean of $f(1),f(2),f(3)$ ?
If There are $f(1)$ red balls, $f(2)$ blue balls, $f(3)$ white balls and ‘$x$’ green balls (balls of the same color are identical). The balls are arranged in a row such that no two balls of the same color are consecutive. Let $x_1$ and $x_2$ be the minimum and maximum values of $x$ respectively for which the above
arrangement is possible. Find the value of $x_1+x_2$.

My attempt: Let $f(3)=n$ and $f(2)=m$ where $m$ and $n$ are positive integers, then $f(1)=1100-n-m$ and $S=3n+2m+1100-n-m$ $= 1100+2n+m$. Given $(1100+2n+m)^3 = 162nm(1100-m-n)$, We need to calculate $\frac{3}{\frac{1}{n}+\frac{1}{m}+\frac{1}{1100-n-m}}$ $= \frac{3nm(1100-n-m)}{1100(n+m)-(n^2+m^2+nm)}$. There must be a trick involved somehwere, i don't think we actually need to find $m$ and $n$. I am also stuck with the second part. Why is $162$ special ? it could have been $S^3 = 100 f(1)f(2)f(3)$ or some other number.
 A: Note that
$$
S^3 = 162f(1)f(2)f(3)\\
\frac{S^3}{3^3} = f(1)\cdot 2f(2)\cdot 3f(3)\\
\frac{S}{3} = \sqrt[3]{f(1)\cdot 2f(2)\cdot 3f(3)}
$$
And since $S = f(1)+2f(2)+3f(3)$, this makes it an AM-GM equality, which tells us that $f(1) = 2f(2)=3f(3)$.
A: We were given three equations:


*

*$f(1)+f(2)+f(3)=1100$

*$f(1)+2f(2)+3f(3)=S$

*$\left(f(1)+2f(2)+3f(3)\right)^{3}=162f(1)f(2)f(3)$
Let us define $x=\sqrt[3]{f(1)}$, $y=\sqrt[3]{2f(2)}$, and $z=\sqrt[3]{3f(3)}$ then substitute it back to the third equation
$$
\begin{aligned}
\left(x^{3}+y^{3}+z^{3}\right)^{3}&=27x^{3}y^{3}z^{3}\\
x^{3}+y^{3}+z^{3}&=3xyz\\
\\
x^{3}+y^{3}+z^{3}-3xyz&=0\\
(x+y+z)(x^{2}+y^{2}+z^{2}-xy-yz-xz)&=0
\end{aligned}
$$
Since $x+y+z\neq0$ then $x^{2}+y^{2}+z^{2}-xy-yz-xz=0$. But for real numbers $x,y,z$ $x^{2}+y^{2}+z^{2}\geq xy+yz+sz$ with equality if $x=y=z$.
Then $f(1)=2f(2)=3f(3)=6x\rightarrow f(1)=6x, f(2) = 3x, f(3)=2x$. Substitute to equation $1$ to obtain $6x+3x+2x=1100 \rightarrow x=100$
There You go, $f(1)=600, f(2)=300, f(2)=200$
