-3a^n(a^n-1+2a^n-2+3a^n-3)+a^n-2(a^n-1-a^n+4a^n+1)
=a^(n-2)[-3a^2(a^(n-1)+2a^(n-2)+3a^(n-3))+(a^(n-1)-a^n+4a^(n+1))]
=a^(n-2)[-3a^(n-1)(a^2+2a+3)+a^(n-1)(1-a+4a^2)]
=a^(2n-3)[-3(a^2+2a+3)+(1-a+4a^2)]
=a^(2n-3)(a^2-7a-8)
=a^(2n-3)(a+1)(a-8)
-3a^n(a^n-1+2a^n-2+3a^n-3)+a^n-2(a^n-1-a^n+4a^n+1)
=a^(n-2)[-3a^2(a^(n-1)+2a^(n-2)+3a^(n-3))+(a^(n-1)-a^n+4a^(n+1))]
=a^(n-2)[-3a^(n-1)(a^2+2a+3)+a^(n-1)(1-a+4a^2)]
=a^(2n-3)[-3(a^2+2a+3)+(1-a+4a^2)]
=a^(2n-3)(a^2-7a-8)
=a^(2n-3)(a+1)(a-8)