Let G be a finite abelian group of order k and let n be a natural number
with gcd(n, k) = 1. Show that the map f : G → G defined by f(g) = g^n
is an isomorphism from G to G. Show that if gcd(n, k) is not equal to 1, then f
need not be an isomorphism.
In the first part, I write since f(gh)=(gh)^n=g^nh^n=f(g)f(h), the map f : G → G defined by f(g) = g^n
is an isomorphism from G to G.
how to prove the second part?