#JavaScript (ES7), <s> 193 ... 156 </s> 154 bytes Returns \$(a_0,a_1,...,a_k)\$ with some possible trailing zeros. <!-- language-all: lang-javascript --> v=>v.map((_,i)=>(g=(i,m=v.map((n,y)=>v.map((_,x)=>x==i?n:y**x)))=>+m||m.reduce((s,[v],i)=>s+(i&1?-v:v)*g(0,m.map(([,...r])=>r).filter(_=>i--)),0))(i)/g()) [Try it online!](https://tio.run/##nZXfbpswFMbv@xS@muzUJrYx/zqRXu0pIlShlGRMIVSkQ6nUd8/OsXHHplUziUIAi@/zd37HOD/qsT7vhvblVZz65@a6L69juRmjrn6h9Im3rNzQQ0lb3pXT4Im/sdkTF7i5lGX7eHp4W60ujMH9fff@3kVD8/xz11B65tuxsk7ne9p@UY9ifBjZ6kAl75zLlkdRNFTwxMCifXt8bQb6VG5aIRjjkjHasvWBMnb9ur0jZCt0xcmyz3ptZaiWnMiFelRLK9ac4HeJHsVuZsOJuWFmY8UiXpzbFg2y2NcN0SFDGuxi68Zyp9LTG9LjnFYPQbIb9LHXQ/KcEwV@KjSHpef1SEIoThIwgEMX/zfxAD8YwIWyDIulDFHpMUAJ8JvCiAqymTAIPfOADApbC75JEuDiPeY4kaUGpgmccxOGw9ipjV8Rk0sMRyYDY2gLcQ4EUGjsjFnQ16mbsbcxliuGwXKUkcH1INffr4nCZsNR4DkPeuPQR7keY1Vup0BXYJsjHZtIasQdpzBosjj/h7HbpCxU4ZZZ7EtLHGMVY86AVLPS3HvvIDnuGZxSg9DzLIOIRYHXOs2ST0IpF0g6TnKWCzcFuwTRITFwmcsCx2Va6E/cPPLJUf9ZZopLCcs0Cp1VkqcFEtPYEKUgbFb9bTetBQz3sbKqu2jfD9/q3Xdak3JDdv3p3B@b6Ngf6J7W8D91/QU "JavaScript (Node.js) – Try It Online") (removed the penultimate test case, which requires more precision than IEEE-754 provides) ###How? We use [Cramer's rule][1] to solve a system of linear equations based on a square [Vandermonde matrix][2]. The Vandermonde matrix of size \$n\times n\$ that we are using is defined as: $$Vn=\begin{pmatrix} 1&0&0&...&0\\ 1&1&1&...&1\\ 1&2&4&...&2^{n-1}\\ \vdots&\vdots&\vdots&&\vdots\\ 1&n-1&(n-1)^2&...&(n-1)^{n-1} \end{pmatrix}$$ The coefficient \$a_i\$ of the polynomial is computed by taking the determinant of the matrix obtained by replacing the \$i\$-th column of \$V_n\$ with the input vector, and dividing by the determinant of \$V_n\$. ###Example for \$(4,2,12,52,140)\$ The constant coefficient \$a_0\$ is given by: $$a_0=\begin{vmatrix} \color{blue}4&0&0&0&0\\ \color{blue}2&1&1&1&1\\ \color{blue}{12}&2&4&8&16\\ \color{blue}{52}&3&9&27&81\\ \color{blue}{140}&4&16&64&256 \end{vmatrix}/|V_5|=\frac{1152}{288}=4$$ The coefficient \$a_1\$ is given by: $$a_1=\begin{vmatrix} 1&\color{blue}4&0&0&0\\ 1&\color{blue}2&1&1&1\\ 1&\color{blue}{12}&4&8&16\\ 1&\color{blue}{52}&9&27&81\\ 1&\color{blue}{140}&16&64&256 \end{vmatrix}/|V_5|=\frac{-576}{288}=-2$$ And so on. [1]: https://en.wikipedia.org/wiki/Cramer%27s_rule [2]: https://en.wikipedia.org/wiki/Vandermonde_matrix