x^n-1=gh+r
x^n=xgh+xr=ax^2+bx=a(x^2-2x+3)+(b+2a)x-3a