Ring of order $n$ is isomorphic to $\Bbb Z/n\Bbb Z$, with $n$ square-free 
Let $R$ be a ring of order $n$ and suppose $n$ has no square in its prime decomposition. How do I see that $R$ is isomorphic to $\Bbb Z/n\Bbb Z$?

I bet that the map $\Bbb Z  \to R, \, 1\mapsto 1_R$ descends to an iso $\Bbb Z/n\Bbb Z \to R$ but I don't see how $n$ having no squares implies the desired descent.
 A: Hint: If $n$ is square-free, then the additive group of $R$ is isomorphic to a direct sum of cyclic groups of prime order and its characteristic is then equal to $n$.

If $n$ is not square free, say $p^k\mid n$ and $p^{k+1}\nmid n$, with $p$ a prime and $k>1$, then there are two nonisomorphic rings with order $n$, namely
$$
\mathbb{Z}/p^k\mathbb{Z}\times\mathbb{Z}/m\mathbb{Z}
$$
and
$$
\mathbb{Z}/p\mathbb{Z}\times\mathbb{Z}/p^{k-1}\mathbb{Z}\times\mathbb{Z}/m\mathbb{Z}
$$
where $m=n/p^k$.
A: Reduce the problem to the following lemma

If $p \mid n$, $\mathbb{Z} / p \mathbb{Z}  \to R / pR$ is well-defined an isomorphism

Since all of the ideals $pR$ and $qR$ are coprime, the Chinese remainder theorem asserts
$$ R = R / nR \cong \prod_{p \mid n} \mathbb{Z}  / p \mathbb{Z}  \cong \mathbb{Z}  / n \mathbb{Z}  $$
If $n$ is not squarefree, there are examples where $\mathbb{Z}  / p^2 \mathbb{Z}  \to R / p^2 R $ is not an isomorphism.
A: We can smuggle the core idea of Cayley's theorem from group theory into ring theory and show that $R$ embeds in the ring of endomorphisms of $R$ as an additive group:
$$ \phi : R \to \text{End}(R,+) \quad \text{as} \quad \phi(r) = [s \mapsto rs] \text.$$
Now, $(R, +)$ is cyclic because $n = |R|$ is squarefree, so $\text{End}(R, +) \cong \text{End}(C_n)$, where $C_n$ is the cyclic group of order $n$.
And $\text{End}(C_n) \cong \mathbb{Z}/n\mathbb{Z}$. (If $n \in \mathbb{Z}$, then $g \mapsto n \cdot g = \sum_{i = 1}^n g$ is an endomorphism of any abelian group; in the case of $C_n$, the image of the generator determines the endomorphism.)
So $R$ embeds in $\mathbb{Z}/n\mathbb{Z}$. The embedding must be an isomorphism since the two rings in question are finite.
