Expressing GCD as a linear combination where coefficients are non zero

number theoryprogramming

Let $n_1,n_2,\cdots n_k$ be $k$ natural numbers and $a_1,a_2,\cdots,a_k$ be integers such that $$gcd(n_1,n_2,\cdots,n_k)=a_1n_1+a_2n_2+\cdots+a_kn_k = \sum_{i=1}^{k}a_in_i$$ .GCD can always be expressed as a linear combination of $n_{i's}$(proof in comment), but my objective is to find natural numbers $n_i$ such that all of the $a_{i's}$ are non zero.

For $k=3$, $\text{gcd}(6,15,77)=6(102)+15(-51)+77(2) = 1$ will be a valid example, but $\text{gcd}(2,3,5)=2(-1)+3(1)+5(0)=1$ is not a valid example as $a_3=0$. Similarly, for $k=4$ , $\text{gcd}(6,15,35,77)=6*(46)+15(-23)+35(2)+77(0) = 1$ will not be a valid example as $a_4=0$, but $\text{gcd}(210,510,2805,10210)=210(-1518876)$ $+510(632865)$ $+2805(-1361)$ $+10210(2) = 5$ is a valid example. I was also able to find an example for $k=5$, $\text{gcd}(210,510,2805,10210,102102)$ $=210(93047862636)$$+510(-38769942765)$ $+2805(83376221)$$+10210(-122522)$$+102102(3) = 1$. I couldn't find an example for $k=6$.

I believe that for every natural number $k$, natural numbers $n_i$ exist which satisfy this property. But I am not able to find a proof or construct such numbers. For a particular $k$, let $(n_1,n_2,\cdots,n_k)$ and $(m_1,m_2,\cdots ,m_k)$ be two pairs satisfying this property. Define$(n_1,n_2,\cdots ,n_k) < (m_1,m_2,\cdots,m_k)$ if $\sum_{i=1}^{k} n_i < \sum_{i=1}^{k} m_i$ and they are equal if their sums are equal. Then for $k=2$ , $(2,3)$ is the smallest solution. For $k=3$ i believe it will be $(6,15,35)$, $\text{gcd}(6,15,35)=6(46)$$+15(-23)+35$$(2)=1$, but i don't have a proof for this. What will be the samllest solutions for other values of $k$?

Best Answer

Suppose Bezout is $\,d\, =\, 0\cdot n_1 +\, \cdots\, + 0\cdot n_j\, +\, a_{j+1}\, n_{j+1} + \cdots + a_k\, n_k,\, $ all $\,a_i \neq 0,\ j\ge 1$.

Choose $a_1\!\neq 0\,$ so $\,1 + a_1 n_1 + n_2 + \cdots + n_j =: c \ne 0.\ $ Multiply above Bezout equation by this

which yields that $\, d + d a_1 n_1\! + dn_2 + \cdots + dn_j =\, c a_{j+1}\, n_{j+1} + \cdots + c a_k\, n_k\,$ with all coef's $\neq 0$.

Related Question