Let $G(a_{1},a_{2})$ be the greatest integer that can not be expressed as $c_{1}a_{1}+c_{2}a_{2}$, where $a_{i}$'s are relatively prime natural numbers, and $c_{i}$ is a whole number.
Formula: $G(a_{1},a_{2})=a_{1}a_{2}-(a_{1}+a_{2})$.
- Example: $G(8,3)=8\times3-(8+3)=24-11=13$.
$14$ can be expressed as $1(8)+2(3)$, $15$ can be expressed as $0(8)+5(3)$, $16$ can be expressed as $2(8)+0(3)$, $17$ can be expressed as $1(8)+3(3)$, $18$ can be expressed as $0(8)+6(3)$, $19$ can be expressed as $2(8)+1(3)$, and so on, and all natural numbers after $13$ can be expressed as $c_{1}(8)+c_{2}(3)$ for some whole numbers $c_{1}$ and $c_{2}$.
Do we have a formula for $G(a_{1},a_{2},a_{3})$?
That is the greatest integer the can not be expressed as $c_{1}a_1+c_{2}a_{2}+c_{3}a_{3}$, where $a_{i}$'s are relatively prime natural number, and $c_{i}$ is a whole number.
Am I right that $G(a_{1},a_{2},a_{3})=G(G(a_{1},a_{2}),a_{3})=G(a_{1}a_{2}-(a_{1}+a_{2}),a_{3})$?
How can we prove that $G(a_{1},a_{2})=a_{1}a_{2}-(a_{1}+a_{2})$?
Good question (it is in my interest) anyway the Problem is the Frobenius or coin problem, there are plenty of proofs for your first formula. As for $3$ coprime generators, it gets complicated and it is not true where you said am i right since when you add a generator $a_3$ to $(a_1,a_2)$ which are coprime your number $G$ will get smaller.