If f is a function satisfying such that , find the value of n.
Question:

If $f$ is a function satisfying $f(x+y)=f(x) f(y)$ for all $x, y \in \mathrm{N}$ such that $f(1)=3$ and $\sum_{x=1}^{n} f(x)=120$, find the value of $n$.

Solution:

It is given that,

$f(x+y)=f(x) \times f(y)$ for all $x, y \in \mathrm{N}$

$f(1)=3$

Taking $x=y=1$ in (1), we obtain

$f(1+1)=f(2)=f(1) f(1)=3 \times 3=9$

Similarly,

$f(1+1+1)=f(3)=f(1+2)=f(1) f(2)=3 \times 9=27$

$f(4)=f(1+3)=f(1) f(3)=3 \times 27=81$

$\therefore f(1), f(2), f(3), \ldots$, that is $3,9,27, \ldots$, forms a G.P. with both the first term and common ratio equal to 3 .

It is known that, $S_{n}=\frac{a\left(r^{n}-1\right)}{r-1}$

It is given that, $\sum_{x=1}^{n} f(x)=120$

$\therefore 120=\frac{3\left(3^{n}-1\right)}{3-1}$

$\Rightarrow 120=\frac{3}{2}\left(3^{n}-1\right)$

$\Rightarrow 3^{n}-1=80$

$\Rightarrow 3^{n}=81=3^{4}$

$\therefore n=4$

Thus, the value of $n$ is 4 .