# How to solve following logarithmic equation: $n(n-1)3^{n} = 91854$

Could somebody please help me solve this equation $n(n-1)3^{n} = 91854$

I can simplify it down to $n\cdot log(3)+ log(n) + log(n-1) = log(91854)$, but I have no idea where to go from there...

p.s. I know the answer is n=7, but no idea how to get there

• Try using plotting a graph of two functions: $f(x)=x(x-1)3^x$ and $g(x)=91854$. See where the intersection happens. – model_checker Nov 1 '16 at 14:30
• Considering how fast $3^n$ outgrows $91854$, it is not hard to brute force for all possible values of $n$. – Yiyuan Lee Nov 1 '16 at 14:30

To Solve Questions of this Type

There is no algebraic method to solve equations like this. If the number on the right hand side had been 91853 instead then the answer can not be written in terms of common expressions (trigonometry, logs/exponentials, arithmetic, etc). Generally questions of this type have to be answered numerically - which could include a number of ways: trial and error, computer software, graphing, etc.

To Solve this Specific Question (or ones where the answer is an integer)

Try to factorize 91854. You'll find that:

$$91854=2\times3^8\times7$$

The $7$ stands out as compared to the other numbers. As we are assuming integer solutions it must be used one of the parts on the left or a combination of them.

Some are easily excluded as they clearly do not have integer solutions. E.g.: $3^n=7\times something$, $n\times3^n=7\times something$, $(n-1)3^n=7\times something$, etc.

The one which looks potentially like a solution is: $n(n-1)=7\times something$

So you can conclude that either $n=7$ or $n-1=7$. Checking easily reveals that the answer is $n=7$.

• Thanks, that helps a lot. Could you just clarify the last sentence please? Why can we conclude n=7 or n-1 =7 ? Thanks again! – gskll Nov 1 '16 at 14:44
• This is assuming that the answer is an integer. The $7$ has to be used in one of the parts on the left. So it could be $n$ or $n-1$ or $3^n$ or a combination of them. Most are clearly not possible using integers so I listed the two most likely. – Ian Miller Nov 1 '16 at 14:47

n<1 => F < 91854

n>=1 F is increasing => F - 91854 has no more then 1 root

One way to get an approximation of a solution is to use the Lambert W function if we note that $n(n-1)\approx\left(n-\frac12\right)^2$.

Start with $$n(n-1)3^n=91854$$ Taking the square root and dividing by $\sqrt[4]{3}$, we get $$\left(n-\frac12\right)\sqrt3^{\,n-\frac12}\approx\frac{\sqrt{91854}}{\sqrt[4]3}$$ Rewriting $\sqrt3^{\,n-\frac12}$ and multiplying by $\frac12\log(3)$, we get $$\frac12\log(3)\left(n-\frac12\right)e^{\frac12\log(3)\left(n-\frac12\right)}\approx\frac12\log(3)\frac{\sqrt{91854}}{\sqrt[4]3}$$ Therefore, $$\frac12\log(3)\left(n-\frac12\right)\approx W\left(\frac12\log(3)\frac{\sqrt{91854}}{\sqrt[4]3}\right)$$ Evaluating, we get $$n\approx6.99578$$ If $n$ is supposed to be an integer, a good guess would be $n=7$. Trying $n=7$ shows that that is indeed the answer.

An algorithm to compute $W(x)$ is given in this answer.

Just keep dividing by $3$ until you get a number that isn't divisible by $3$.

• After dividing by $3$ eight times, we get $14$. However, $n=7$, not eight. Try $n(n-1)3^n=1417176$; there, you can divide by $3$ eleven times, but $n=9$. – robjohn Jan 21 '17 at 12:14