Constructing integer sets in which a certain equation has no solution Given some linear equation, e.g., $$x+2y=3z+4u+5w,$$ I would like to construct a set $S$ of $n$ positive integers so that equation has no solution in $S$.

Two questions:

1) How big must the integers in $S$ be? That is, how large is $\max_{a \in S} a$? Can $S$ be chosen in such a way that this latter quantity is  $O(n \log^k n)$ for some $k$? 

2) How long does it take to construct (either deterministically or with randomization) a set $S$ of $n$ positive integers where a fixed linear equation has no solution, and such that the largest number $\max_{a \in S} a$ has (approximately) minimal size?
Consider an equation
$$\tag{E}a_1x_1+\dots+a_kx_k=0.$$
Let $s=\sum_ia_i$ be the sum of its coefficients.

If $s=0$, the equation (E) has solutions in every nonempty set $S$, hence you are out of luck.

If $s\ne0$, let $p$ be the smallest prime not dividing $s$. Note that $p=O(\log |s|)$. Then (E) has no solution such that $x_i\equiv1\pmod p$ for all $i=1,\dots,k$, hence the set
$$S=\{1,p+1,\dots,(n-1)p+1\}$$
works, with maximum $(n-1)p+1$. For a fixed equation (E), this is $O(n)$, and the set can be computed as easily as it gets.