Let's say I have a multiset of complex numbers $\lbrace a_1,\cdots,a_n\rbrace$ (so some of the elements may be repeated) and I would like to construct an entire function $p(z)$ with those numbers as zeroes. However, I also have a multiset of complex numbers $B = \lbrace b_1,\cdots,b_n \rbrace$ such that I wish $p(b_i) = 1$ - **p is only 1 on the $b_i$'s**.

It seems like trying to use Lagrange's polynomial interpolation formula gives you a polynomial with too high a degree (greater than $n$ and less than or equal to $2n$), and then there's the possibility that $p^{-1}(1) \nsubseteq B$.

I've been thinking about doing the following:

Let $g(z) = (x-a_1) \cdots (x - a_n)$, and then via Weierstrass construct an entire function $h(z)$ such that $e^{h(b_i)} = 1/g(b_i)$. Then it seems like the entire function $e^{h(z)}g(z)$ is getting somewhat closer to what I want - but then again I don't know if there are any other $\alpha$'s such that $e^{h(\alpha)}g(\alpha) = 1$ where $\alpha \notin B$.

The problem of polynomial interpolation and fitting seems very well studied; however, I can't seem to find a reference for this particular puzzle.

Thanks in advance!