Suppose natural number $p$ has the unique prime decomposition $p=\prod_{i=1}^n p_i^{k_i}$ where $p_i$'s are distinct primes and $k_i$'s are natural numbers. Let $N:=\{1,2,\cdots,n\}$ and $$x:=\sum_{J\subseteq N}(-1)^{|J|}c^{p_J},\quad p_J:=\frac{p}{\prod_{i\in J}p_i},$$ where $c$ is yet another natural number. How does one show that $p|x$? This conjecture generalizes Fermat's little theorem as it is the case when $p$ is prime.
I thought of pairing the summands up and apply Fermat's little theorem but to no avail.
$x$ is in fact an enumeration using the inclusion-exclusion principle (hence the sum with alternating signs) resulting from a simplified variation on this question enumerating the bead color arrangement.