x5 + x4 + 1 = x5 - x3 - x2 - x4 + x2 + x + x3 - x - 1
= x2 ( x3 - x - 1 ) - x ( x3 - x - 1 ) + 1 ( x3 - x - 1 )
= ( x3 - x - 1 ) ( x2 - x + 1 )
x5+x4+1
= x5+x2-x2+x4-x+x+1
=x2(x3-1) + (x3+1) +x2+x+1
= x2(x-1)(x2+x+1)+x(x-1)( x2+x+1) +x2+x+1
=( x2 + x+1)( x3-x2+x2-x+1)
=(x2 + x+1)( x3-x+1)