TITLE: What is $\mbox{Hom}(\mathbb{Z}/2,\mathbb{Z}/n)$?
QUESTION [6 upvotes]: Simple question (I seem have asked a few like this...)
What is $\mbox{Hom}(\mathbb{Z}/2,\mathbb{Z}/n)$? (for $n \ne 2$)

REPLY [5 votes]: Try to find the neccessary condition for such a homomorphism first. 
If f is a homomorphism from Z/2 to Z/n then clearly f maps the zero element of Z/2 to the zero element of Z/n. Can it map 1 to an arbitrary element of Z/n? No, the mapping should be such that f is a homomorphism. Assuming it is, and $f(1) = x$, clearly $0 = f(0) = f(1+1) = f(1) + f(1) = x + x$ should hold, following which $2x = 0$ in Z/n. So this is a neccessary condition. 
It is easy to see that this condition is sufficient as well. So the homomorphisms may be counted in number by counting all such x. This amounts to counting all solutions to the congruence $2x = 0$ in Z/n. 
Clearly as $gcd(2,n)|0$ so solutions always exist and they will be gcd(2,n) (which may be either 1 or 2, depending upon whether n is odd or even repectively) in number. So Hom(Z/2,Z/n) will have either 1 or 2 elements. In either case, it will be cyclic because all groups of order 1 and 2 are.