I have a question about a proof involving greatest common divisors. A function $g(k) = \gcd(13k+2, 5k-1)$ is defined where $k$ is an integer. How do we find all the elements of $\{g(k) : k \in \mathbb{Z}\}$?
So, the first thing I did was simplify using the division algorithm and it turns out $\gcd (13k+2, 5k-1) = \gcd(k+9, -23) = \gcd(k+9, 23)$.
It can be easily seen that $\gcd = 1$ and $23$ since $23$ is prime. So would all the elements in $\{g(k): k \in \mathbb{Z}\}$ be $\{1, 23\}$? I used some numbers to try it out and it seems so.
Also, how do we prove if $b<a$ and that $a$ and $b$ are positive integers, then $\{k \in\mathbb{Z}: g(k)>1\} = \{k \in\mathbb{Z}: a \mid(k+b)\}$? To prove this I know if $g(k)>1$ then it is $23$. However, I'm stuck on $a\mid (k+b)$. I think there are $2$ cases, where $(k+b)$ is either positive or negative.