If n = 1, then it is easy to see that

your group has 1 generator. Now take

Take A = {

and x is an integer } so basically

. Now take

, if we pulled x = 1, then we can easily see

is a generattor, now take

, so, since gcd(m, n) can be written in the form gcd(m, n) = pm + qn , where p, q are integers, we see that

so

where p and q are integers, and so

which equals

, now since we assumed

, we can say

so since

is also a generator of the group (if you take any element in <a> and by raising it to powers, get a as a result after some power, that initial element is a generator of the whole group), thus

where

are unique elements of the group

, and since a raised to a power from A gives us a unique generator, so

is the number of generators for <a>