How can I demonstrate that $x-x^9$ is divisible by 30? How can I demonstrate that $x-x^9$ is divisible by $30$ whenever $x$ is an integer?
I know that $$x-x^9=x(1-x^8)=x(1-x^4)(1+x^4)=x(1-x^2)(1+x^2)(1+x^4)$$
but I don't know how to demonstrate that this number is divisible by $30$.
 A: Let's factor $x^9-x$ like you have done:
$$
x^9-x=(x-1)x(x+1)(x^2+1)(x^4+1).\tag{$*$}
$$
Let's look at the RHS. The product of the first 2 terms is divisible by $2$ because it consists of 2 consecutive integers. Similarly, the product of the first 3 terms is divisible by $3$. Now, if you had
$$
(x-2)(x-1)x(x+1)(x+2)
$$
then of course that would be divisible by $5$ as well. But note this
$$
(x-1)x(x+1)(x^2+1)-(x-2)(x-1)x(x+1)(x+2)=5x(x^2-1)\equiv 0\pmod{5}.
$$
So the product of the first 4 terms of the RHS of ($*$) is also divisible by $5$. Now you're done.
A: You have to prove that $x-x^9$ is divisible by $2$, $3$ and $5$.


*

*$x\equiv x^9\pmod{2}$ is obvious, isn't it?

*By Fermat's little theorem, $x^3\equiv x\pmod{3}$, so $x^9=(x^3)^3\equiv x^3\equiv x\pmod{3}$

*By Fermat's little theorem, $x^5\equiv x\pmod{5}$, so $x^9=x^4x^5\equiv x^4 x\equiv x^5\equiv x\pmod{5}$.
A: It's a special case of the following theorem. The direction we need $(\Leftarrow)$ 
has a very simple proof.
Theorem $\ $  For natural numbers $\rm\:a,e,n\:$ with $\rm\:e,n>1$ 
$\qquad\rm n\:|\:a^e-a\:$ for all $\rm\:a\:\iff  n\:$ is squarefree, and prime $\rm\:p\:|\:n\:\Rightarrow\: p\!-\!1\:|\:e\!-\!1$ 
