My solution to this problem, although it can be generalized to any finite abelian group , is not straightforward. See if you can find a simple solution:
Let be a prime number. Let and be cyclic groups of orders and respectively. Let Find the number of group homomorphisms