Factor a^3+a^2b+a+b