I was asked to determine all possible couples $(a,b) \in \mathbb{Z}^2$ which satisfies $\text{gcd}(411,2016) = a411 + b2016$. Using the Euclidean division alogirthm, I have found that \begin{align} 2016 &= 4 \cdot 411 + 372\\ 411 &= 1 \cdot 372 + 39\\ 372 &= 9 \cdot 39 + 21\\ 39 &= 1 \cdot 21 + 18\\ 21 &= 1 \cdot 18 + 3\\ 18 &= 3 \cdot 6 \end{align} from which it folows that $\text{gcd}(411,2016) = 3$. Working back, I find that $3 = 21 \cdot 2016 - 103 \cdot 411$.
In order to determine the other solutions, I worked more generale: suppose we want to find $x,y \in \mathbb{Z}$ such that $ax + by = d$. Suppose that $(x,y), (x',y')$ are two solutions, then filling this in we find that $a(x-x') = b(y' - y)$. Supposing that $a,b$ are coprime (as is the case for my expansion of $3$, we must have that $a$ is a divisor of $y'-y$ and $b$ is a divisor of $x-x'$. Therefore, there are $k, k' \in \mathbb{Z}$ such that $ak = y'-y$ and $bk' = x-x'$. However, I have no idea how $k,k'$ are related. Any hints?