Find the value of n so that may be the geometric mean between a and b.
Question:

Find the value of $n$ so that $\frac{a^{n+1}+b^{n+1}}{a^{n}+b^{n}}$ may be the geometric mean between $a$ and $b$.

Solution:

G. M. of $a$ and $b$ is $\sqrt{a b}$.

By the given condition, $\frac{a^{n+1}+b^{n+1}}{a^{n}+b^{n}}=\sqrt{a b}$

Squaring both sides, we obtain

$\frac{\left(a^{n+1}+b^{n+1}\right)^{2}}{\left(a^{n}+b^{n}\right)^{2}}=a b$

$\Rightarrow a^{2 n+2}+2 a^{n+1} b^{n+1}+b^{2 n+2}=(a b)\left(a^{2 n}+2 a^{n} b^{n}+b^{2 n}\right)$

$\Rightarrow a^{2 n+2}+2 a^{n+1} b^{n+1}+b^{2 n+2}=a^{2 n+1} b+2 a^{n+1} b^{n+1}+a b^{2 n+1}$

$\Rightarrow a^{2 n+2}+b^{2 n+2}=a^{2 n+1} b+a b^{2 n+1}$

$\Rightarrow a^{2 n+2}-a^{2 n+1} b=a b^{2 n+1}-b^{2 n+2}$

$\Rightarrow a^{2 n+1}(a-b)=b^{2 n+1}(a-b)$

$\Rightarrow\left(\frac{a}{b}\right)^{2 n+1}=1=\left(\frac{a}{b}\right)^{0}$

$\Rightarrow 2 n+1=0$

$\Rightarrow n=\frac{-1}{2}$