# A wonky quartic

Algebra Level 5

The sum of all values of $$a$$ such that the equation $(x^2-x+a+1)^2=4a(5x^2-x+1)$ has exactly three distinct real solutions, is of the form $$\dfrac{n+\sqrt{k}}{m}$$, where $$k,m,n$$ are integers, $$k\geq 0,$$ $$m\geq 1$$ and $$m$$ is the smallest possible. Find $$k+n+m.$$

×