# Can you cut through the mist?

I've created a mapping between words and complex-valued polynomials, and I've generated examples from word lists that I've I found on another puzzle. You don't need to study every one of these, but I recommend you study a few (1-5 of your choice) of them to get the hang of what the pattern is.

$$125741 x^{4} + 121879 i x^{3} - 39265 x^{2} - 4937 i x + 210 = \text{diet}$$ $$52327 x^{3} + 19518 i x^{2} - 1541 x - 30 i = \text{set}$$ $$1123441 x^{4} + 816565 i x^{3} - 161237 x^{2} - 10547 i x + 210 = \text{poem}$$ $$2430827 x^{4} + 1215483 i x^{3} - 184035 x^{2} - 10789 i x + 210 = \text{dust}$$ $$87857033 x^{5} + 121851510 i x^{4} - 37954862 x^{3} - 4128036 i x^{2} + 169961 x + 2310 i = \text{suite}$$ $$82786 x^{4} + 187003 i x^{3} - 100910 x^{2} - 10151 i x + 210 = \text{tape}$$ $$171039 x^{4} + 405755 i x^{3} - 208887 x^{2} - 13021 i x + 210 = \text{tube}$$ $$158097049 x^{5} + 202359278 i x^{4} - 48570918 x^{3} - 4478188 i x^{2} + 171809 x + 2310 i = \text{quote}$$ $$1622871789 x^{7} + 9191060836 i x^{6} - 13856459083 x^{5} - 7787386342 i x^{4} + 2084272163 x^{3} + 286658696 i x^{2} - 19453349 x - 510510 i = \text{disobey}$$ $$711942 x^{6} + 4455847 i x^{5} - 9967276 x^{4} - 9738036 i x^{3} + 4105552 x^{2} + 620917 i x - 30030 = \text{biased}$$ $$71489 x^{3} + 26306 i x^{2} - 1967 x - 30 i = \text{yes}$$ $$410451 x^{4} + 1045535 i x^{3} - 210247 x^{2} - 12557 i x + 210 = \text{tomb}$$ $$7854 x^{5} + 33715 i x^{4} - 55187 x^{3} - 43175 i x^{2} + 16159 x + 2310 i = \text{badge}$$ $$473316743 x^{5} + 218054962 i x^{4} - 38764626 x^{3} - 3342128 i x^{2} + 140431 x + 2310 i = \text{joust}$$ $$475887 x^{4} + 457703 i x^{3} - 106263 x^{2} - 8737 i x + 210 = \text{bump}$$ $$89815 x^{4} + 111121 i x^{3} - 42383 x^{2} - 5447 i x + 210 = \text{cite}$$

The question is, what polynomial corresponds to the word "mist"?

$$\text{mist} = 4485851 x^4 +1580965ix^3 - 200803 x^2 - 10859ix + 210$$

Reasoning

Let $$p_m$$ represent the $$m$$th prime number (e.g, $$p_1 = 2, p_2 = 3, \ldots$$).
For each letter $$l$$ in a word $$w$$, let $$f(l, w)$$ be the index of the letter $$l$$ in $$w$$ (e.g, $$f(d, diet) = 1, f(m, tomb) = 3$$).
Furthermore, let $$g(l)$$ be the position of letter $$l$$ in the alphabet (e.g, $$g(a) = 1, g(m) = 13$$).

Then the formula for the polynomial corresponding to word $$w$$ is $$P_w(x) = \displaystyle \prod_{l \in w} (p_{g(l)}x + p_{f(l,w)} i)$$

Example

$$P_{poem}(x) = (p_{g(p)}x + p_1 i)(p_{g(o)}x + p_2 i)(p_{g(e)}x + p_3 i)(p_{g(m)}x + p_4 i)$$ $$= (p_{16}x + p_1 i)(p_{15}x + p_2 i)(p_{5}x + p_3 i)(p_{13}x + p_4 i)$$ $$= (53x + 2i)(47x + 3i)(11x + 5i)(41x + 7i)$$ $$= 1123441 x^4 + 816565 i x^3 - 161237 x^2 - 10547 i x + 210$$ Similarly,
$$P_{mist}(x) = (p_{13}x + p_1i)(p_9 x + p_2i)(p_{19}x + p_3i)(p_{20}x + p_4i)$$ $$= (41x+2i)(23x+3i)(67x+5i)(71x+7i)$$ $$4485851 x^4 + 1580965i x^3 - 200803 x^2 - 10859 i x + 210$$