Associates in the Ring of Polynomials mod n Let $a$ and $b$ be elements of the polynomial ring $\mathbb{Z}/n\mathbb{Z}[x]$. If $a$ and $b$ generate the same ideal, must they be associates? If $n$ is prime, then it is easy to see that the answer is "yes". But what if $n$ is not prime?
 A: Looking at 
the paper referenced by Robin Chapman and Bill Dubuque in response to the recent closely related question, it seems to me that the answer is "yes", though it may very well fall into mosquito-nuking territory. I hope what follows is not in error!
A commutative ring with identity $R$ is called présimplifiable if and only if $xy=x$ implies $x=0$ or $y\in U(R)$ ($y$ is a unit).
If $R$ is présimplifiable, then $(a)=(b)$ implies $a$ and $b$ are associates: we know that $a=bx$ for some $x$, and $b=ay$ for some $y$, so $a=bx=a(xy)$. Since $R$ is présimplifiable, either $a=0$ or $xy$ is a unit. If $a=0$, then $(a)=(0)=(b)$, so $b=0$, hence $b=a1$. If $xy$ is a unit, then $y$ is a unit, so $b=ay$ is an associate of $y$.
The paper cited above cites another paper for the following result:
Theorem. $R[X]$ is présimplifiable if and only if $R$ is présimplifiable and $(0)$ is a primary ideal of $R$.
Getting back to your question. First, consider the case in which $n$ is a prime power, $n=p^n$. Note that $R=\mathbb{Z}/p^n\mathbb{Z}$ is présimplifiable: if $ab\equiv a \pmod{p^n}$, then $p^n|a(b-1)$. If $p^n|a$, then $\overline{a}=0$ (where $\overline{a}$ is the image of $a$ in $R$). If $p^n$ does not divide $a$, then $b-1$ must be a multiple of $p$. But if $b-1$ is a multiple. of $p$, then $b$ is relatively prime to $p$, hence $\overline{b}$ is a unit in $R$. Thus, if $\overline{a}\overline{b}=\overline{a}$ in $R$, then either $\overline{a}=0$ or $\overline{b}$ is a unit. Also, $(0)$ is a primary ideal of $\mathbb{Z}/p^n\mathbb{Z}$. If $\overline{a}\overline{b}\in(0)$ and $\overline{a}\notin (0)$, then $p|b$, hence some power of $b$ is a multiple of $p^n$, so there exists $j\gt 0$ with $\overline{b}^j\in(0)$. By the theorem quoted above, it follows that $\mathbb{Z}/p^n\mathbb{Z}[X]$ is présimplifiable. In particular, if $a$ and $b$ in $\mathbb{Z}/p^n\mathbb{Z}[x]$ generate the same ideal, then they are associates.
So the property holds for $n$ a prime power, because then the polynomial ring is présimplifiable, which is a stronger condition. However, when trying to go from prime powers to arbitrary composites, we are not so lucky. For $n$ composite but not a prime power, the ideal $(n)$ of $\mathbb{Z}$ is not primary, so the ideal $(0)$ of $\mathbb{Z}/n\mathbb{Z}$ is not primary, hence $\mathbb{Z}/n\mathbb{Z}[X]$ is not présimplifiable. For instance, $2=2(4)$ in $\mathbb{Z}/6\mathbb{Z}[X]$, but we have neither $2=0$ nor $4$ a unit. But nonetheless I believe the result holds.
To try to get the result for arbitrary $n$, the Chinese Remainder Theorem suggests itself instead. Factor $n$ as a product of prime powers, $n=p_1^{a_1}\cdots p_r^{a_r}$. Suppose that $(a)=(b)$ in $\mathbb{Z}/n\mathbb{Z}[X]$. Moding out by the ideal $(p_i^{a_i})$, we get $(\overline{a})=(\overline{b})$ in $\mathbb{Z}/p_i^{a_i}\mathbb{Z}[X]$, so by the result for prime powers we know that there is a unit $\overline{u}_i$ of $\mathbb{Z}/p_i^{a_i}\mathbb{Z}[X]$ such that $\overline{a}\overline{u}_i=\overline{b}$. Using the Chinese Remainder Theorem we obtain a unit $u\in\mathbb{Z}/n\mathbb{Z}[X]$ such that $u\equiv u_i \pmod{(p_i^{a_i})}$ for each $i$, hence $au=b$ (to see it is a unit, just lift the inverses to get an inverse for $u$; to see that we have equality $au=b$, note that the Chinese Remainder Theorem guarantees it holds modulo the gcd of the ideals, but $(p_1^{a_1})\cdots(p_r^{a_r}) = (0)$ in $\mathbb{Z}/n\mathbb{Z}[X]$, so we actually have equality).
So it would seem, if I did not make some mistake, that for these rings you do have that $(a)=(b)$ if and only if $b=au$ for some unit $u$.

I think we can avoid using the sledgehammer theorem quoted above to show that if $p$ is a prime, then $\mathbb{Z}/p^n\mathbb{Z}[X]$ is présimplifiable.
Suppose that $a,b\in\mathbb{Z}/p^s\mathbb{Z}[X]$ are such that $ab=a$ and $a\neq 0$. We have $a(b-1)=0$; lift them to $\mathbb{Z}[X]$ and write:
\begin{align*}
a &= a_0 + a_1x + \cdots +a_mx^m\\\
b-1 &= b_0 + b_1x + \cdots b_mx^m.
\end{align*}
I claim that $p|b_i$ for each $i$. Indeed, since the content of $a(b-1)$ is a multiple of $p^n$, but the content of $a$ is not a multiple of $p^n$, then the content of $b-1$ must be a multiple of $p$ (since the content of the product is the product of the contents).
Therefore, the content of $(b-1)^{n}$ is divisible by $p^n$, hence projecting down to $\mathbb{Z}/p^n\mathbb{Z}[X]$ we have that $(b-1)^n = 0$. Therefore,
$$b\left(b^{n-1} - \binom{n}{1}b^{n-2} + \cdots + (-1)^{n-1}\binom{n}{n-1}\right) = (-1)^{n}$$
hence $b$ is a unit in $\mathbb{Z}/p^n\mathbb{Z}[X]$. Thus, if $ab=a$, then either $a=0$ or $b$ is a unit, and we conclude that $\mathbb{Z}/p^n\mathbb{Z}[X]$ is présimplifiable.
