# Subgroups of $\mathbb{Z}$?

I have this set: $$I_a = \{ax+(7-a^2)y : x, y \in \mathbb{Z}\}$$ with $a$ integer. I have two tasks over it:

1) Prove that $I_a$ is subgroup of $\mathbb{Z}$;

2) Fully characterize this subgroup.

I did the first task, but for the second I was thinking on cases, that is, if $a$ is equal to $7k, 7k\pm 1,7k\pm 2$ or $7k \pm 3$, for some $k \in \mathbb{Z}$. I was successful with $a= 7k$ (this is: $\langle 7 \rangle = I_a$), but I can't with the other cases. Some hints?

-
Do you know that $I_a=\langle a\rangle+\langle 7-a^2\rangle=\langle \gcd(a,7-a^2)\rangle$? (where $\gcd$ is the greatest common divisor) –  Dennis Gulko May 28 '12 at 12:52
Yes, I know. But I need explicitly gcd –  Mario De León Urbina May 28 '12 at 13:37

Hint $\rm\:(1)\:\ I = a\,\mathbb Z\! +\! b\, \mathbb Z\:$ is closed under subtraction so a subgroup of $\left<\mathbb Z, +\right>$ by the subgroup test.

$\rm(2)\:\ \{0\}\ne I\:$ has a least positive $\rm\:c.\:$ Being a group, $\rm\:I \supseteq c\:\mathbb Z.\:$ This is an equality (else there exists $\rm\:d\in I\:$ such that $\rm\:nc < d < (n\!+\!1)c,\:$ so $\rm\ 0 < d\!-\!nc < c\:$ and $\rm\:d\!-\!nc \in I,\:$ contra leastness of $\rm\:c).\:$ Thus $\rm\:a,b\in I = c\,\mathbb Z\:\Rightarrow\:c\:|\:a,b.\:$ $\rm\:d\:|\:a,b\:\Rightarrow\:d\:|\:c = j\,a\!+\!k\,b\:\Rightarrow\: d\le c.\:$ Thus $\rm\,\ c = gcd(a,b),\:$ since $\rm\:c\:$ is a common divisor of $\rm\:a,b\:$ that is greater or equal than any other common divisor $\rm\:d.$

But $\rm\:gcd(a,b\!-\!an) = gcd(a,b)\:$ since if $\rm\:c\:|\:a\:$ then $\rm\:c\:|\:b\!-\!an\iff c\:|\:b.\:$

So $\rm\:\ \ gcd(a,7-a^2) = gcd(a,7) = c,\:$ where $\rm\: c = 7\:$ if $\rm\:7\:|\:a,\:$ else $\rm\:c = 1\:$ if $\rm\:7\nmid a.$

-

First, can you show that 7 is in $I_a$?

Then, can you show that if there is even one number in $I_a$ that isn't a multiple of 7, then $I_a$ is all of $\bf Z$?

-

To ellaborate on my comment:
Hint: $I_a=\langle a\rangle+\langle 7-a^2\rangle=\langle \gcd(a,7-a^2)\rangle$ (where $\gcd$ is the greatest common divisor)
Denote $d=\gcd(a,7-a^2)$. $d$ divides $a$, and $d$ divides $7-a^2$ (clearly $d$ divides $a^2$). Can you proceed?

-
I think it's a brilliant hint. –  mixedmath May 28 '12 at 14:42
Whoever downvoted - care to explain? You think it is wrong? –  Dennis Gulko May 29 '12 at 7:23

Prove this general fact first: Let $a,b\in \mathbb{Z}$ and $S = \{ ax + by : x,y \in \mathbb{Z} \}.$ Then $S = n\mathbb{Z}$ where $n=\gcd(a,b).$ An outline of a proof is: Prove that the least positive element of $S$ is a $\gcd$ of $a$ and $b.$ Call this number $n.$ Show all integer multiples of $n$ are in $S$, so $n\mathbb{Z} \subseteq S.$ Now pick some element $s\in S.$ By the division algorithm, we can write $s=qn + r$ where $q,r \in \mathbb{Z}$ and $0\leq r< n.$ Since $s,qn \in S$ and $r=s-qn$, we have $r\in S.$ We picked $n$ to be the least positive element of $S$, so $r=0$ and $s=qn$, so $S\subseteq n\mathbb{Z}.$

-