For which $n \in \mathbb{N}$ does $x^8 + [2]_nx^7+[6]_nx^6-x^2-[2]_nx - [6]_n = [0]_n$ have at least $7$ distinct solutions? I have to find one $n \in \mathbb{N}$ such that $$x^8 + [2]_nx^7+[6]_nx^6-x^2-[2]_nx - [6]_n = [0]_n$$ has at least $7$ distinct solutions in $\mathbb{Z}_n$ (or, equivalently, $f(x) = x^8 + [2]_nx^7+[6]_nx^6-x^2-[2]_nx - [6]_n \in \mathbb{Z}_n[x]$ has at least $7$ roots with multiplicity $1$). 
How do I approach such a problem?

Hint We can proceed naively but efficiently. It is plausibly useful to factor $f(x)$ over $\Bbb Q$:
$$f(x) = (x^6 - 1)(x^2 + 2 x + 6),$$
and recalling our cyclotomic polynomials, we can easily factor the first factor, giving, respectively,
$$f(x) = (x - 1)(x + 1)(x^2 + x + 1)(x^2 - x + 1)(x^2 + 2 x + 6).$$
Obviously, we need $n \geq 7$.
On the other hand, we see that modulo $3$ all of the above factors factor especially nicely, and respectively into
$$x-1, \quad x + 1, \quad (x - 1)^2, \quad (x + 1)^2, \quad x(x - 1).$$

For each $x$ such that at least two of these factors are $0 \pmod 3$, the product of the corresponding terms in the factorization over $\Bbb Q$ is $0 \pmod 9$, and hence so is $p(x)$. By inspection, that condition holds when $x \equiv \pm 1 \pmod 3$, and hence $p(x) = 0 \pmod 9$ for $x = 1, 2, 4, 5, 7, 8$. Finally, we see that substituting $x = 6$ into $x^2 + 2 x + 6$ gives $0$ mod $9$, so $n = 9$ satisfies the criterion.

