# How can I simplify $\prod_\limits{n=1\atop n\ne m}^{a}\frac{nx - 1}{n - m}:\ ?$

I ran into the following product while doing a Lagrange Polynomial Interpolation for a math puzzle I created for myself and am struggling to simplify it further: $$\prod_{\Large n = 1\atop \Large n \ne m}^{a} \frac{nx - 1}{n - m}$$ Without the $$n\ne m$$ part, $$\tt WolframAlpha$$ gives me: $$\prod_{\Large n = 1 \atop\Large n \ne m}^{a} \frac{nx-1}{n-m} = \frac{x^{a}\,\Gamma\left(1 - m\right)\Gamma\left(1 + a - x^{-1}\right)}{\Gamma\left(1 + a - m\right) \Gamma\left(1 - x^{-1}\right)}$$

• This does not work though ( not unexpected ) because $$m \in \mathbb{N}$$ and I know $$\Gamma\left(\mathbb{-N}\right) = \text{undefined}$$. I am sure there are more problems with this formula but that one was the easiest for me to find.
• I do know how to even attempt to evaluate this product with the $$n \ne m$$ because I have not taken a math course high enough to evaluate even simple products let alone ones like this.

Edit: I am also looking through this book I found, Table of Integrals, Series, and Products (PDF link via archive.org) but haven't found anything helpful yet.

• Why do you say $m \in \mathbb{Z}$? $m$ is not necessarily positive?
– 温泽海
Commented Jul 10 at 23:40
• @温泽海 My bad, should it be $\mathbb{N}$? $m$ is always positive. Commented Jul 10 at 23:46
• $\mathbb{N}$ usually means all non-negative integers, which includes $0$. In your case, you can either write $m \in \mathbb{Z}^+$ or say in word $m$ is a positive integer or say $m \in \{1, \ldots, a\}$.
– 温泽海
Commented Jul 10 at 23:49
• Some people use $\Bbb N$ to mean nonnegative integers, but many others (including most number theorists) use $\Bbb N$ to mean positive integers. Commented Jul 10 at 23:50
• But I don't understand why cannot you just divide the formula given by wolframalpha by the $m$ term?
– 温泽海
Commented Jul 10 at 23:50

Assuming $$m>0$$ and $$a>m$$

Denominator $$\prod\limits_{n=1, n\ne m}^a (n-m)=\prod\limits_{n=1}^{m-1} (n-m)\prod\limits_{n=m+1}^{a} (n-m)$$ Using Pochhammer symbols $$\prod\limits_{n=1}^{m-1} (n-m)=(1-m)_{m-1}=(-1)^{m+1}\, (1)_{m-1}=(-1)^{m+1}\,\Gamma(m)$$ $$\prod\limits_{n=m+1}^{a} (n-m)=\Gamma (a-m+1)$$ Recombining $$\text{denominator}=\prod\limits_{n=1, n\ne m}^a (n-m)=(-1)^{m+1}\,\Gamma(m)\,\Gamma (a-m+1)$$

Numerator $$\prod\limits_{n=1, n\ne m}^a (n x-1)=\prod\limits_{n=1}^{m-1} (n x-1) \prod\limits_{n=m+1}^{a} (n x-1)$$ $$\prod\limits_{n=1}^{m-1} (n x-1) =x^{m-1} \left(\frac{x-1}{x}\right)_{m-1}=-\frac{x^m \Gamma \left(m-\frac{1}{x}\right)}{\Gamma\left(-\frac{1}{x}\right)}$$ $$\prod\limits_{n=m+1}^{a} (n x-1)=x^{a-m} \left(m-\frac{1}{x}+1\right)_{a-m}=\frac{x^{a-m}\, \Gamma \left(a-\frac{1}{x}+1\right)}{\Gamma \left(m-\frac{1}{x}+1\right)}$$ Recombining (assuming $$x\neq \frac 1m$$) $$\text{numerator}=\prod\limits_{n=1, n\ne m}^a (n x-1)=\frac{x^a \,\Gamma \left(a-\frac{1}{x}+1\right)}{(m x-1) \Gamma \left(1-\frac{1}{x}\right)}$$

Therefore $$\large\color{blue}{\prod_\limits{n=1\atop n\ne m}^{a}\frac{nx - 1}{n - m}=(-1)^{m+1}\,\frac{x^a \,\Gamma\left(a-\frac{1}{x}+1\right)}{(mx-1)\, \Gamma (m)\, \Gamma\left(1-\frac{1}{x}\right)\, \Gamma(a-m+1)}}$$

First of all, WolframAlpha was wrong in that it didn't understand the condition $$n\ne m$$: what's true is $$\prod_{n=1}^a \biggl(\frac{nx-1}{n-z}\biggr) = \frac{x^{a}\Gamma(1-z)\Gamma(1+a-x^{-1})}{\Gamma(1+a-z)\Gamma(1-x^{-1})}$$ for any complex $$z$$. Therefore \begin{align*} \prod_{\substack{1\le n\le a \\ n\ne m}} \biggl(\frac{nx-1}{n-z}\biggr) &= \frac{x^{a}\Gamma(1-z)\Gamma(1+a-x^{-1})}{\Gamma(1+a-z)\Gamma(1-x^{-1})} \bigg/ \frac{mx-1}{m-z} \\ &= \frac{x^{a}\Gamma(1+a-x^{-1})}{\Gamma(1+a-z)\Gamma(1-x^{-1})(mx-1)} (m-z)\Gamma(1-z), \end{align*} and so \begin{align*} \prod_{\substack{1\le n\le a \\ n\ne m}} \biggl(\frac{nx-1}{n-m}\biggr) &= \lim_{z\to m} \prod_{\substack{1\le n\le a \\ n\ne m}} \biggl(\frac{nx-1}{n-z}\biggr) \\ &= \frac{x^{a}\Gamma(1+a-x^{-1})}{\Gamma(1+a-m)\Gamma(1-x^{-1})(mx-1)} \lim_{z\to m} (m-z)\Gamma(1-z) \\ &= \frac{x^{a}\Gamma(1+a-x^{-1})}{(a-m)!\Gamma(1-x^{-1})(mx-1)} \lim_{z\to m} (m-z)\Gamma(1-z). \end{align*} The last limit can be calculated from the known residues of the Gamma function at its poles, yielding \begin{align*} \prod_{\substack{1\le n\le a \\ n\ne m}} \biggl(\frac{nx-1}{n-m}\biggr) &= \frac{x^{a}\Gamma(1+a-x^{-1})}{(a-m)!\Gamma(1-x^{-1})(mx-1)} \frac{(-1)^{m-1}}{(m-1)!}. \end{align*}

$$P_m:=\prod\limits_{n=1, n\ne m}^a (n-m)= (m-1)! (a-m)!(-1)^{m-1}$$

Proof:- for fixed $$m$$ the first $$m-1$$ numbers in the product are $$(1-m )(2-m)\dots 1 = (-1)^{m-1}(m-1)!$$ then the rest numbers in the product are $$1(2)(3) \dots (a-m)= (a-m)!$$

$$p_x:= \prod\limits_{n=1, n\ne m}^a (nx-1)=\frac{1}{mx-1}\prod\limits_{n=1}^a (nx-1)$$ (assuming $$x \ne 1/m$$). $$p_x=\frac{x^{a} (-1)^a}{mx-1} \prod \left(\frac{1}{x}-n\right)=\frac{x^{a} (-1)^a}{mx-1}\cdot \frac{\left(\frac 1 x -1 \right)!}{\left(\frac 1 x -1 -a\right)!}$$

Assuming of course $$x\ne 1/n$$ or the product equals zero

Now what if $$x=1/m$$

$$p_{1/m}= \left[\left(\frac{1}{m}-1\right)\left(\frac{2}{m}-1\right)\left(\frac{3}{m}-1\right)\dots \left(\frac{m-1}{m}-1\right) \right]\cdot\left[\left(\frac{m+1}{m}-1\right)\left(\frac{m+2}{m}-1\right)\left(\frac{m+3}{m}-1\right)\left(\frac{a}{m}-1\right)\right]=\frac{(-1)^{m-1}a!}{m^{a-1}}$$

Now your product is $$f(x,m):=\frac{p_x}{p_m}$$

$$f(x,m) = \begin{cases} \frac{{x^{a} (-1)^{a-m+1}}\cdot {\left(\frac 1 x -1 \right)!}}{(mx-1)(m-1)! (a-m)!\left(\frac 1 x -1 -a\right)!}, & xm \ne 1 \\ \frac{{a!}}{(m-1)! (a-m)!m^{a-1}}, & xm=1 \\ 0, & xn=1 \text{ for } n\ne m \end{cases}$$