About divisibility of certain sums We have the following theorem;
Theorem: If $a$ divide $b_1$,$a$ divide $b_2$,...,$a$ divide $b_{n}$, then for any integers $c_1, c_2,\ldots, c_{n}$, $a$ divide $X_{n}=\sum_{i=1}^n b_{i}c_{i}$.
My question is about the existence an inverse or a special inverse of this result, i.e. a result of the form: 
If $a$ divide $X_{n}=\sum_{i=1}^n b_{i}c_{i}$ then $a$ divide $b_1$,$a$ divide $b_2$,...,$a$ divide $b_{n}$ for any (or some) integers $c_2, c_2,\ldots,c_{n}$.
I cant find a similar result in the net.
 A: I found one, borrowing idea of sum of square from Maman's comment.

If $p \equiv 3 \pmod{4}$ is a prime and $p \mid a^2+b^2$ then $p\mid a,p \mid b$.

A: It could be hard to find solution of that problem without some special constraints, because, we can have that $a$ divides $\sum_{i=1}^n c_ib_i$ but that $a$ divides as many as we want numbers in the set $\{b_1,...b_n\}$.
To see that suppose that we have $\sum_{i=1}^n c_ib_i=da$ for some integer $d$.
Then, if numbers from the set $\{b_{\sigma(i)},...,b_{\sigma(k)}\}$ (this set can be empty) are divisible by $a$ and numbers from the set $\{b_1,...b_n\} \setminus \{b_{\sigma(i)},...,b_{\sigma(k)}\}=\{h_1,...h_l\}$ are not divisible by $a$ then number $\sum_{j=1}^k c_{\gamma(j)} b_{\sigma(j)}$ is divisible by $a$ but the number $\sum_{w=1}^l c_w h_w$ does not need to be divisible by $a$ and there will be solution of $\sum_{w=1}^l c_w h_w=ga$ if and only if $\gcd(c_1,...c_w)$ divides $ga$ so there can be a solution even if none of $\{h_1,...h_l\}$ is divisible by $a$.
To observe this try with some small examples made by you and look on the internet about linear diophantine equations.
