I'm given $(n_1,n_2,n_3)$, with $\operatorname{gcd}(n_1,n_2,n_3)=1$. Then, I need to find $c_1$, the least positive integer such that $c_1n_1=n_2\mathbb{N}+n_3\mathbb{N}$. I additionally need the specific coefficients $r_{12}$ and $r_{13}$ such that $c_1n_1=r_{12}n_2+r_{13}n_3$.
Note that every number mentioned so far is non-negative.
So far, I'm calculating the Apery set of $n_2\mathbb{N}+n_3\mathbb{N}$ (with respect to it's multiplicity), and checking for membership through this. While this works to find my $c_1$, it leaves me nowhere with finding $r_{12}$ or $r_{13}$. While I could immediatally solve the diophantine equation $c_1n_1=r_{12}n_2+r_{13}n_3$, I can't help but think this isn't a very efficient way to do it.
Should I just solve the linear diophantine equation, or is there some better way to find the particular way that $c_1n_1$ is written in terms of $n_2$ and $n_3$?