As 6005 answered, you try to find $n$ such that the equation $$f(n)=n^4-100 n^3 +50 a=0$$ and, according to the link, this formula applies for $0\leq n \leq 50$ (and $a<125000$). As said, analytical solutions of quartic polynomials are not so funny and it could be easier to use a numerical method such as Newton. Starting from a guess $n_0$, the method will update it according to $$n_{k+1}=n_k-\frac{f(n_k)}{f'(n_k)}$$ that is to say $$n_{k+1}=\frac{n_k^3 (3 n_k-200)-50 a}{4 (n_k-75) n_k^2}$$ So, start at, say $n_0=25$ and iterate.
For illustration purposes, let us take $a=56789$; the iterates will then be $$n_1=38.3406$$ $$n_2=35.3914$$ $$n_3=35.2673$$ $$n_4=35.2671$$ which is the solution for six significant figures. All of that can easily be done using Excel.
You can improve the starting point using $n_0=a^{1/3}$ (this will be clear if you make a log-log plot of $n^4-100n^3$) and the first iterate of Newton method will be $$n_1=\frac{\left(3 \sqrt[3]{a}-250\right) \sqrt[3]{a}}{4 \left(\sqrt[3]{a}-75\right)}$$ which seems to be very good. For the illustrating case, this will give $n_1=35.3986$.
A still better approximation could be obtained using the simplest Pade approximant (do not worry : you will learn about them !). It will give $$n\approx \frac{650 a^{2/3}-3 a-30000 \sqrt[3]{a}}{-5 a^{2/3}+900 \sqrt[3]{a}-37500}$$ which, for the test case, will give $n\approx 35.2802$.
More accurate formulae could be made. Just post if you want better approximations.
Edit
Taking into account your last comments, for an exact solution use Newton
$$n_{k+1}=\frac{n_k^3 (3 n_k-200)-50 a}{4 (n_k-75) n_k^2}$$ and choose $$n_0=50\, \big(\frac a {125000}\big)^{0.4306}$$ obtained minimizing $$\Phi(\alpha)=\int_0^{50}\Big(\frac{n^3(100-n) }{50}-125000 \big(\frac n {50}\big)^\alpha \Big)^2 \,dn$$ This exactly matches both end points and leads to an error of less than one unit over the whole range. Applied to $a=56789$, this gives $n_0=35.5985$ and the iterative process converges to the exact solution in a couple of iterations.
A more empirical (but much better) model could be $$n \approx 43.2633 \,x^{0.345438}+6.63856\, x^{1.33377}$$ where $x=\frac a {125000}$ (notice that the exponents are almost $\frac 13$ and $\frac 43$). The maximum error is smaller than $0.1$ over the whole range. For the test value, the result would be $35.2603$.
Edit
We can get the exact solution to the problem. Let us define $N=\frac n {50}$ and $A=\frac a {125000}$. This makes the equation to solve $N^3(N-2)+A=0$ which is a "quite simple" quartic. Now, let us define $$Z=\sqrt[3]{\sqrt{3} \sqrt{27 A^2-16 A^3}+9 A}$$ $$T=\sqrt{\frac{2\ 2^{2/3} A}{\sqrt[3]{3} Z}+\frac{\sqrt[3]{2} Z}{3^{2/3}}+1}$$ This leads to $$N=\frac{T+1}{2}-\frac{1}{2} \sqrt{\frac{2}{T}-\frac{2\ 2^{2/3} Y}{\sqrt[3]{3} Z}-\frac{\sqrt[3]{2}
Z}{3^{2/3}}+2}$$