Factor a^2+3a+8a+24