Ring-Homomorphism from $\mathbb{Z}_{2}$ to $\mathbb{Z}_{2n}$ Let $n$ be a positive integer. Then the problem is to show that there is a ring-homomorphism from $\mathbb{Z}_{2}$ to $\mathbb{Z}_{2n}$ if and only if $n$ is odd.
My effort : let $\phi$ be such a ring homomorphism (apart from the zero-map). then if $\phi(1)\ =\ a$ and $1.1\ =\ 1$ in $\mathbb{Z}_{2}$ so in $\mathbb{Z}_{2n}$ we must have $a^{2}\ =\ a$. Moreover $\phi(1+1)\ =\ \phi(0)\ =\ 2a$ and so $|2a|$ must divide $2n$. But I can't deduce anything from these.
Thanks
 A: If $n$ is even then 
$$n^2=2^2(n/2)^2=4(n/2)(n/2)=(2n)(n/2)=0$$
but in that case, $n^2=n$ so $n$ is not even (that is, $n$ is odd.)
A: Consider $\phi : \mathbb{Z}_2 \rightarrow \mathbb{Z}_4$
you should be able to see that $\phi(\bar{0})=\bar{0}$ i.e., $\phi(2.\bar{1})=\bar{0}$ i.e., $2.\phi(\bar{1})=\bar{0}$
Now only possibility for $\phi(\bar{1})$ excluding $\bar{0}$ is $\phi(\bar{1})=\bar{2}$.
But then, your map should preserve multiplication property also...
I mean you should have $\phi(\bar{1})=\phi(\bar{1}.\bar{1})=\phi(\bar{1}).\phi(\bar{1})=\bar{2}.\bar{2}=\bar{0}$
so the only possibility which we have got is not even well defined as $\phi(\bar{1})$ is taking two distinct values.
More generally $\bar{1}$ should be send to $\bar{n}$ and in that case, for similar reasn as above,
$\phi(\bar{1})=\phi(\bar{1}.\bar{1})=\phi(\bar{1}).\phi(\bar{1})=\bar{n}.\bar{n}=\bar{n}^2$
the worst case we should not have is $n^2$ being divided by $2n$
i.e., $n$ being divided by $2$.. which means $n$ has to be odd.... 
I hope you can do the other way.... 
