If $a_i=0$ for all large enough $i$, then $e$, being transcendental, cannot be a solution to your equation, unless $a_i=0$ for all $i\ge1$. Otherwise, if $a_i\ne0$ for infinitely many $i$, then the series for $e$ cannot converge, given that the $a_i$'s are integers, because then $|a_ie^i|\ge e^i\not\to0$ if $a_i\ne0$. However, this can be done for $1/e$, as follows: $a_0:=0$, $a_j:=\max\{k\in\mathbb Z\colon ke^{-j}+S_{j-1}\le1$ for $j=1,2,\dots$, where $S_{j-1}:=\sum_{i=1}^{j-1}a_ie^{-i}$.