$0 = (a-n) x^{n-1} + ax^{n-2} + ax^{n-3} + \cdots + ax + a$ What is $x$ in terms of $a$ and $n$?
I don't even know what this form of polynomial is called.
EDIT: In the required algorithm, $a$ and $n$ are never equal to $0$, and $n≥a+2$
EDIT2: the value of X is then used in the following formula
$ F(z)=\frac{nx^{z-1}}{\sum_{i=1}^n x^{i-1}} $
If we do a bit of reorganizing we can get $$nx^{n-1}=a\left(\sum_{k=0}^{n-1}x^k\right)$$ Using the partial sum formula for geometric series we get $$nx^{n-1} =a\frac{1-x^{n}}{1-x}$$ Doing some work with it... $$(1-x)nx^{n-1}=a(1-x^n)$$ $$a(1-x^{n})-(1-x)nx^{n-1}=0$$ $$(n-a)x^n-nx^{n-1}+a=0$$ At this point there doesn't seem to be any known general factorizations, but this form definitely looks less intimidating. I find it a little odd however that we managed to go from a $n-1$ degree polynomial to a $n$ degree polynomial, so please point out any mistakes (I feel like you would just get some extraneuos solutions). Note that if we assume that $a\neq 1$ we find that $x=1$ is said extraneous solution.