Problem

Source: INMO 2018

Tags: algebra, Polynomials, Divisibility, Roots of a polynomial



Find all polynomials with real coefficients $P(x)$ such that $P(x^2+x+1)$ divides $P(x^3-1)$.