Saying $n \mid a^k$ implies that $\{$ prime divisors of n $\} \subset \{$ prime divisors of $a^k\} = \{$ prime divisors of a $\}$
Assume now that $n$ has only simple prime divisors, and wonder if it is actually possible that $n \mid a^k$ without $n \mid a$ holding
Take $p$ a monic non-null polynomial and write its (unique) decomposition as a product of monic irreducible polynomials :
$$p=q_1^{\alpha_1}...q_r^{\alpha_r} $$
Then by the Chinese Remainder theorem :
$$F[x]/(p)\text{ is isomorphic to } F[x]/(q_1^{\alpha_1})\times...\times F[x]/(q_r^{\alpha_r})$$
Now suppose $\alpha_1=...=\alpha_r=1$ (i.e. $p$ is squarefree) then
$$F[x]/(p)\text{ is isomorphic to } F[x]/(q_1)\times...\times F[x]/(q_r)$$
Cannot have non-zero nilpotent elements because it is a product ring of fields : assume $(a_1,...,a_r)^n=0$ in $F[x]/(q_1)\times...\times F[x]/(q_r)$ then $a_i^n=0$ for each $i$ but you are in a field so $a_i=0$.
On the other hand suppose $\alpha_1\geq 2$ then :
$$(q_1,0,...,0)\neq 0 \text{ in } F[x]/(q_1^{\alpha_1})\times...\times F[x]/(q_r^{\alpha_r}) $$
But clearly :
$$(q_1,0,...,0)^{\alpha_1}=(q_1^{\alpha_1},0,...,0)=(0,...,0)\text{ in }F[x]/(q_1^{\alpha_1})\times...\times F[x]/(q_r^{\alpha_r}) $$
So it has a nilpotent element. For a direct proof you can show that the nilpotent elements of a product of rings is the product of the set of nilpotent elements of each ring.
Best Answer
If $n=p_1^{r_1}\dots p_k^{r_k}$, we have: $$\mathbf Z/n\mathbf Z\simeq\mathbf Z/p_1^{r_1}\mathbf Z\times\dotsm\times\mathbf Z/ p_k^{r_k}\mathbf Z $$ An element in $\mathbf Z/n\mathbf Z$ is nilpotent if and only if its images in each of $\mathbf Z/p_i^{r_i}\mathbf Z,\enspace i=1,\dots, k$, are nilpotent. Now the nilradical of $\mathbf Z/p_i^{r_i}\mathbf Z$ is the ideal: $$p_i\mathbf Z/p_i^{r_i}\mathbf Z\simeq \mathbf Z/p_i^{r_i-1}\mathbf Z$$ which contains $p_i^{r_i-1}$ elements. Thus the number of nilpotent elements in $\mathbf Z/n\mathbf Z$ is $$ p_1^{r_1-1}\dotsm p_k^{r_k-1}=\frac n{p_1\dotsm p_k}. $$ and the set of nilpotents elements in $\mathbf Z/n\mathbf Z$ by the above isomorphism, is: $$(p_1\dotsm p_k)\mathbf Z/n\mathbf Z.$$