I'm having trouble understanding a part of the proof for the final theorem of this article https://www.cambridge.org/core/services/aop-cambridge-core/content/view/S0017089506003272.
The discriminant of $g(x)=x^4+px^2+qx+r$ is
$-27p^4-108p^3q-162p^2q^2-108pq^3-27q^4+256r^3$
We can rewrite $f(x)=x^4+ax^3+bx^2+cx+d = (x+\frac{a}{4})^4+(b-\frac{3}{8}a^2)x^2+(c-\frac{a^3}{16})x+(d-\frac{a^4}{256})$.
If we let
$p= b-\frac{3}{8}a^2$, $q=c-\frac{a^3}{16}$ and $r= d-\frac{a^4}{256}$ then the discriminant of $f$ is
$2^{24} \cdot(-27p^4-108p^3q-162p^2q^2-108pq^3-27q^4+256r^3)$
I don't understand why this is true since $f$ does not have the same shape as $g$ because of $(x+\frac{a}{4})^4$.
Also, where did the constant $2^{24}$ come from? Does it depend on the linear transformation $x \mapsto x+\frac{a}{4}$? Does it have to do with the fact that the discriminant is a homogeneous polynomial of degree $2n-2=2(4)-2=6$ in the coefficients of $f$?