kill(all)$

https://eli.thegreenplace.net/2010/03/30/horners-rule-efficient-evaluation-of-polynomials

score(x) := r0*x^0 + r1*x^1 + r2*x^2;

factor(score(x));

horner(score(x));

Score(x,n) := sum(r[i]*x^i,i,0,n-1);

horner(Score(D,3));

factor(%);