Suppose that $x_1, \dots,x_n$ are given as an input. Then we want to find $a_1,\ldots,a_n$ that satisfy $a_1x_1 + a_2x_2+a_3x_3 + a_4x_4+\cdots +a_nx_n =0$. (including the case where such $a$ set does not exist.)
How does one find this easily? (So I am asking for an algorithm.)
Edit: all numbers are non-zero integers.
Based on the tags, I'm assuming that the $x_i$ and $a_i$ are supposed to be integers. The procedure below generalizes to the case where you want simultaneous solutions to multiple equations. (It also works the same way if we use any principal ideal domain in place of integers.)
Write the inputs as a $1 \times n$ matrix $X = \begin{pmatrix}x_1 & \dotsb & x_n\end{pmatrix}$; assume $X \ne 0$ or else the problem is trivial. The problem is to find the vectors $A = \begin{pmatrix}a_1 & \dotsb & a_n\end{pmatrix}^T$ such that $XA = 0$. Smith normal form says that we can find an invertible $n \times n$ matrix $T$ such that $XT = \begin{pmatrix}d & 0 & \dotsb & 0\end{pmatrix}$, where $d = \gcd(x_1, \dotsc, x_n)$. (There would also be a $1 \times 1$ matrix $S$ that goes on the left, but we can just take it to be $1$.) Because $X$ only has one row, this is much easier than general Smith normal form: For each $i > 1$, one can perform column operations on $X$ to replace two entries $x_1,x_i$ with $\gcd(x_1,x_i)$ and $0$; for instance, if $\gcd(x,y) = d = px + qy$ and $x = rd$, $y = sd$, then $$ \begin{pmatrix}x & y\end{pmatrix} \begin{pmatrix}p & -s \\ q & r\end{pmatrix} = \begin{pmatrix}d & 0\end{pmatrix} $$ where the matrix is invertible as $pr + qs = (px + qy)/d = 1$.
Now, to solve $XA = 0$ for $A$, we solve $XTB = 0$ for a $n \times 1$ vector $B$, which is easy: any $B$ whose first component is zero will do. Then we just take $A = TB$.
This not only shows that there are always solutions, but that in fact the set of solutions is parametrized by $n-1$ integers.