Is X^2+X+1 a factor of X^3+X+1 in Z/3Z?

I was thinking since X=1 make X^2+X+1=0 and also X^3+X+1, can we say that there exists a P(X) that X^3+X+1 = (X^2+X+1) p(X)

Thanks

## Factors question

### Re: Factors question

No it is not, try long division.

### Re: Factors question

I tried to use this method,PNT wrote:No it is not, try long division.

Assuming (x^2+x+1)(ax+b) = ax^3+(a+b)x^2+(a+b)x+(b+1) = X^3+X+1,

then by checking X^3 and the constant, we got a=3n+1 , b = 3m (n,m are of Z). then (a+b)X^2 --> X^2 !=0 which contradicts the assumption.

is this logic ok or any better solution to check?

Thanks,

### Re: Factors question

well since x^2+x+1 and x^3+x+1 both have 1 as the leading coeff and the zero power coeff you know ax+b has to have the form x+1, which doesnt work.

### Re: Factors question

Well, I think Hom just misunderstood the question and led us to another direction....

I have his materials, and i think the question is:

What are the common divisors of x^2+x+1 and x^3+x+1 in Z/3Z

I have his materials, and i think the question is:

What are the common divisors of x^2+x+1 and x^3+x+1 in Z/3Z

### Re: Factors question

in that case use the euclidean algorithm and you get x+2

### Re: Factors question

and 1....PNT wrote:in that case use the euclidean algorithm and you get x+2

### Re: Factors question

Thank you guys. Appreciate it.mhyyh wrote:and 1....PNT wrote:in that case use the euclidean algorithm and you get x+2