# Greatest common divisor of two specified sequences of numbers (search for equality)

I consider two sequences of numbers $$A=\{a_1,...,a_n\}$$ and $$B=\{k-a_1,...,k-a_n\}$$, where $$a_1 \le a_2 \le ... \le a_n \le k$$.

I am looking for such conditions under which: $$\gcd(a_1,...,a_n) = \gcd(k-a_1,...,k-a_n)=1$$.

In more general form: $$\gcd(a_1,...,a_n) = \gcd(k-a_1,...,k-a_n) \ge 1$$.

It can be seen that the problem is solved only in a particular forms.

I found only four particular solutions.

1. If there is such a number $$\exists a_s \in A: k-a_t=a_s$$, where $$a_t \in A$$ then $$\gcd(a_1,...,a_n) = \gcd(k-a_1,...,k-a_n)$$.

2. Let $$\gcd(a_1,...,a_n)=e$$ and $$\gcd(a_n-a_1,...,a_2-a_1)=E$$. If $$e=E$$ and $$e\mid k$$, then $$\gcd(a_1,...,a_n) = \gcd(k-a_1,...,k-a_n)$$.

3. Let $$P=p_1 \cdot ... \cdot p_n$$ denotes the primorial equaling the product of the first $$n$$ prime numbers and $$p_i$$ is the $$i^{th}$$ prime number. Let $$a_i=\frac{P}{p_i}$$ and $$k=P$$, then $$\gcd(a_1,...,a_n) = \gcd(k-a_1,...,k-a_n) = 1$$.

4. Let $$\gcd(k-a_1,...,k-a_n) = 1$$ and $$a_i\mid k, \forall a_i \in A$$, then $$\gcd(a_1,...,a_n) = 1$$.

I am convinced that there are other solutions, but I can not find them yet. I will be grateful for any help.

• What if I took $k=a_n+1$? – Mohan May 13 '19 at 22:53
• I agree, also a decision on the similarity of 4. But very trivial. – Виталий May 13 '19 at 23:13
• Why have you written $\equiv$ here? Normally I'd think that denoted congruence modulo some number but there's no $\pmod{m}$ here... – Daniel McLaury May 13 '19 at 23:33

Here is a try. Call $$k$$ to be good, if $$d_k\triangleq (k-a_1,\dots,k-a_n)>(a_1,\dots,a_n)=1$$. If $$k$$ is good, it then follows that, there is a prime $$p$$, such that $$p\mid k-a_i$$ for every $$1\leqslant i \leqslant n$$. In particular, $$a_1\equiv \cdots\equiv a_n\equiv k\pmod{p}$$. Hence, if $$k$$ is good, then there necessarily is a prime $$p$$ at which $$a_1,\dots,a_n$$ are all congruent.
Now, if $$k$$ is such that, if for all prime $$p$$, there is an $$i$$ with $$k-a_i\not\equiv 0\pmod{p}$$, we then have that $$(k-a_1,\dots,k-a_n)=1$$. In particular, a sufficient condition is as follows. If the collection $$(a_1,\dots,a_n)$$ is such that, for every prime $$p$$, there exists $$i such that $$a_i\not\equiv a_j\pmod{p}$$, we have that for any $$k$$, $$(k-a_1,\dots,k-a_n)=1$$.
• Just a vocabulary that, if $d_k=(k-a_1,\dots,k-a_n)>1$. Nothing super fancy/necessary either. – kawa May 14 '19 at 1:28
• Let $P=\{p_1,...,p_s\}, p_s \le a_1$. If for each $p \in P$ in the set ${a_1, ..., a_n}$ exists at least one pair $a_i, a_j: a_i \not\equiv a_j \pmod{p}$ on specific $p$ then $\gcd\{a_1, ..., a_n\}=1$. Only one thing I don't understand - is how to prove that if $a_i \not\equiv a_j \pmod{p}$ then also for the same $p: k-a_i \not\equiv k-a_j \pmod{p}, \forall k \in N$. – Виталий May 14 '19 at 15:05
• Because, if $p\mid k-a_i$ for every $i$, if holds that, $a_1\equiv a_2\equiv \cdots \equiv k\pmod{p}$, right? Hence, as long as you ensure $(a_1,\dots,a_n)$ has two distinct elements modulo $p$ for every $p$ prime, you have that for every $k$, $(k-a_1,\dots,k-a_n)=1$, no? – kawa May 14 '19 at 19:37
• This not valid for $n=a_1=2$. For example, $\gcd\{2,9\}=1$ but if $k=16$, then $\gcd\{7,14\}=2$. – Виталий May 15 '19 at 15:21