I want to find all non-trivial subrings of $\mathbb Z_n$.
So let $S$ be a subring (not necessarily containing $[1]$ ). Then $(S,+)$ is a asubgroup of $(\mathbb Z_n,+)$, so $S$ is generated by an element of $[a]$ of $\mathbb Z_n$.
Now if $\gcd(a,n)=1$ then order of $[a]$ in $(\mathbb Z_n,+)$ is $n$ so $S$ becomes the whole ring which we don't want. Also we want $[a] \ne [0]$.
All elements of $[a]$ are of the form $r[a]$ so for $S$ to be a subring we must have for all integers $r,m: r[a]\cdot m[a] = [rma^2] \in S$, that is $[rma^2]=k[a]=[ka]$ for some integer $k$ depending on $m$ and $r$.
In particular $[a^2]=[k'a]$ and conversely if $[a^2]=[ka]$ holds then
$$r[a]\cdot m[a]=[rma^2]=rm[a^2]=rm[ka]=rmk[a]\in S$$
So $S$ becomes a subring if $[a^2]=[ka]$. We conclude $\langle [a] \rangle$ is a non-trivial subring of $(\mathbb Z_n,+)$ iff
- $n$ does not divide $a$,
- $\gcd(n,a) \ne 1$ and
- $n|a^2-ka$ for some integer $k$
Now how do we enumerate all such $a$ for a given $n$ ?
$\Bbb EDIT :$ Any subgroup of $\mathbb Z_n$ or equivalently of $(\mathbb Z/n\mathbb Z,+)$ is of the form $k\mathbb Z / n \mathbb Z$ where $n\mathbb Z \subseteq k \mathbb Z$
i.e. $k|n$ , now for any $kx+n\mathbb Z , ky+n \mathbb Z \in k\mathbb Z/n\mathbb Z$ ,
$(kx+n\mathbb Z).(ky+n\mathbb Z)=(kx)(ky)+n\mathbb Z=k(xky)+n\mathbb Z \in k\mathbb Z /n\mathbb Z$ thus $k\mathbb Z / n\mathbb Z$ is a a subring , so
every subgroup of $\mathbb Z_n$ is a subring .
Now my question is : "Which subrings $S$ of $\mathbb Z_n$contains a multiplicative identity , that is $\exists e\in S$ such that for every $x \in S , x.e=e.x=x$ ? "
Any subgroup of $\def\Z{\mathbb{Z}}\Z/n\Z$ is a subring, being an ideal.
Suppose a subring $k\Z/n\Z$ has an identity; then there exists $ke$ such that $$ (ke)(kx)-kx\equiv 0\pmod{n} $$ that is $$ kx(ke-1)\equiv 0\pmod{n} $$ for all integers $x$. Since $k$ divides $n$, $n=mk$, so we must have $$ x(ke-1)\equiv 0\pmod{m} $$ for all integers $x$. In particular, $ke\equiv 1\pmod{m}$, which implies $\gcd(k,m)=1$.
So a necessary condition for $k\Z/n\Z$ to have an identity is that $$ \gcd\Bigl(k,\frac{n}{k}\Bigr)=1 $$
Is this also sufficient?