  For relatively prime natural numbers $a$ and $b$, we study the two equations
$ax+by = (a-1)(b-1)/2$ and $ax+by+1= (a-1)(b-1)/2$, which arise from the study
of cyclotomic polynomials. Previous work showed that exactly one equation has a
nonnegative solution, and the solution is unique. Our first result gives
criteria to determine which equation is used for a given pair $(a,b)$. We then
use the criteria to study the sequence of equations used by the pair
$(a_n/\gcd{(a_n, a_{n+1})}, a_{n+1}/\gcd{(a_n, a_{n+1})})$ from several special
sequences $(a_n)_{n\geq 1}$. Finally, fixing $k \in \mathbb{N}$, we investigate
the periodicity of the sequence of equations used by the pair $(k/\gcd{(k, n)},
n/\gcd{(k, n)})$ as $n$ increases.
