What are the polynomial solutions of the difference equation $W(x+h)=\frac{c(x+h)}{d(x+h)}W(x)$ for $W(x)$? Let $d(x)=\prod_{s=1}^{n}(x-a_s)$ and $c(x)=\prod_{s=1}^{n}(x-a_s+b_s h)$ be polynomials, where $a_s, b_s$ are some complex numbers. What are the polynomial solutions of the difference equation $W(x+h)=\frac{c(x+h)}{d(x+h)}W(x)$ for $W(x)$? Thank you very much.
Edit: $b_s$ are positive integers.
 A: When the $b_s$ are nonnegative integers, the general solution is
$$
W(x)=V(x)\cdot\prod\limits_{s=1}^n\,\prod\limits_{k=1}^{b_s}\,(x-a_s+kh),
$$
where $V$ has period $h$. Thus $W$ is a polynomial function if and only if $V$ is constant.
Edit The proof is direct: call $V(x)$ the ratio of $W(x)$ by the product over $(s,k)$ on the RHS. Check that the functional equation $d(x+h)W(x+h)=c(x+h)W(x)$ (which is not a difference equation) is equivalent to $V(x)=V(x+h)$. Then the condition that $W$ is a polynomial implies that $V$ is a rational function. The only periodic rational functions are constant hence the proof is complete.
A: It is instructive to look at this from the stand-point of general solution, which is 
$$
   W(x) =\kappa \cdot \prod_{s=1}^n \frac{\Gamma\left(\frac{x-a_s}{h} + b_s + 1 \right)}{\Gamma\left(\frac{x-a_s}{h} +1 \right)}
$$
Using the recurrence equation for $\Gamma(z)$, i.e. $G(z+n) = (z+n-1) \cdots (z+1)z \Gamma(z)$, we get that $W(x)$ is polynomial iff if $b_s$ are non-negative integers.
added:
The necessary condition is that there exists a permutation of the tuple $\left[ b_1 +1 - \frac{a_1}{h}, \ldots, b_n +1 - \frac{a_n}{h}\right]$ so that it equals to $\left[m_1 + 1 - \frac{a_1}{h}, \ldots, m_n + 1 - \frac{a_n}{h}\right]$ for non-negative integers $m_1,\ldots,m_n$.
A non-trivial example was provided by @DidierPiau, with $n=2$, $h=1$, $[a_1,a_2] = [1,1/2]$, $[b_1,b_2] = [1/2,1/2]$. Then $[b_1+1-a_1/h,b_2+1-a_2/h] = [1/2,1]$, and $[1-a_1/h,1-a_2/h] = [0,1/2]$. The ratio of $\Gamma$-function, thus simplifies to $x$, and $W(x) = \kappa x$.
