Can I say that from inspection, $(x-1)$ is a factor which implies that $p(1) = 0$.
I then used long division which then gave this: $p(x) = (x-1)(\sum \limits _{i=1} ^{n} x^{n-i})$
How would you have approached the (non) trivial problem?
Can I say that from inspection, $(x-1)$ is a factor which implies that $p(1) = 0$.
I then used long division which then gave this: $p(x) = (x-1)(\sum \limits _{i=1} ^{n} x^{n-i})$
How would you have approached the (non) trivial problem?
I would recommend reading up on cyclotomic polynomials. These are the minimal polynomials of primitive roots of unity.
Using the theory of cyclotomic polynomials, this problem is straightforward.
$$x^n-1 = \prod_{d|n} \Phi_d(x) $$
where $\Phi_d(x)$ is the $d^{th}$ cyclotomic polynomial.
The Wikipedia article lists a bunch of the cyclotomic polynomials, and there is also an easy formula for computing them.