1

An integer $k$ is a generator of the group $\mathbb{Z_n}$ if and only if $\gcd(k, n)=1$.

So $\langle k\rangle=\mathbb{Z_n}$ iff $\gcd(k,n) = 1$.

Is there any general way to prove this?

I see that it's so obvious but can't find a general way to prove it.

Shaun
  • 44,997
jun
  • 661
  • Hint: $\text{gcd}(k, n) = 1$ if and only if there exist integers $a, b$ such that $ak + bn = 1$ (this is also interesting to prove if you've never seen it). – diracdeltafunk Sep 11 '20 at 16:24
  • 3
    Please give your definition of "generator of $\Bbb Z_n$" (and is that a group or ring?) – Bill Dubuque Sep 11 '20 at 16:24
  • oh it's a group. sorry! – jun Sep 11 '20 at 16:26
  • @diracdeltafunk easier, and preferable to use \gcd(k, n) = 1 – amWhy Sep 11 '20 at 16:27
  • @amWhy what's the difference? – jun Sep 11 '20 at 16:28
  • 1
    Spacing. And as $\gcd$ is an operator, it makes sense it displays as such. Unfortunately, there are some operators. like lcd, which one needs to use \operatorname{lcd} – amWhy Sep 11 '20 at 16:31
  • @amwhy thanks! I just forgot that was already defined. – diracdeltafunk Sep 11 '20 at 16:33
  • No problem, @diracdeltafunk. I learned a lot about mathjax usage by tips from other users in my first year or two here. Anytime I can offer a tip that saves the author/commenter a little time when formatting, I try to return the favor! – amWhy Sep 11 '20 at 16:36
  • Same as the linked dupes except you have additive notation, so a power $a^k$ of a generator $,a,$ becomes an integer multiple $,k\cdot a\ (=k,$ here using $,a=1,$ to generate the additive group $, Z_n).,$ This is a FAQ with likely many tens if not hundreds of answers. Please strive to search for answers before posting questions. – Bill Dubuque Sep 11 '20 at 17:23
  • @amWhy just a reminder that you can use \rm for \operatorname. –  Sep 11 '20 at 17:29

2 Answers2

0

By Bezout, the integer has an inverse $\bmod n$ precisely when $(n,k)=1$.

But, $1$ generates $\Bbb Z_n$. So once you can get $1$ it's all over.

-1

If $\gcd(n,k)=d > 1$, then $k/d$ is an integer, so $$n . \frac{k}{d} = 0 \in \mathbb{Z}_n$$

so the order of $k$ is less than $n/d$, so it is striclty less than $n$, so $k$ does not generate $\mathbb{Z}_n$.

If $\gcd(n,k)=1$, then there exists $a,b$ such that $ak+bn=1$, so $$ak=1 \in \mathbb{Z}_n$$

so the subgroup generated by $k$ contains $1$, which generates $\mathbb{Z}_n$, so it contains $\mathbb{Z}_n$, so it is $\mathbb{Z}_n$.

TheSilverDoe
  • 29,720