6

I am trying to find an efficient way of calculating the unsigned coefficients of $$P_n(x)=\prod_{k=1}^{n}(x-k),$$ i.e. I want to speed up the process of calculating $a_k(n)$ such that $$P_n(x)=\sum_{k=0}^{n}(-1)^ka_k(n)x^{n-k}.$$

I found a method, but for $n\ge 5$ it is very inefficient. I found it by noting that $$\prod_{a\in A}(x-a)=\sum_{k=0}^{|A|}(-1)^{k}x^{|A|-k}\sum_{P\subseteq A\\ |P|=k}\prod_{u\in P}u\ .$$ So setting $A=\{1,2,...,n\}$ for some $n\in\Bbb N$, $$\prod_{a\in A}(x-a)=P_n(x)=\sum_{k=0}^{n}(-1)^kx^{n-k}\sum_{P\subseteq A\\ |P|=k}\prod_{u\in P}u\ .$$ So of course I defined $$a_0(n)=1$$ and $$a_k(n)=\sum_{P\subseteq\{1,...,n\}\\ \quad |P|=k}\prod_{u\in P}u\ .\tag{1}$$

If we plug in $x=0$, $$P_n(0)=\prod_{k=1}^{n}(-k)=(-1)^n n!\ ,$$ so that $$a_n(n)=n!\ .$$ It is also fairly easy to show that $$a_1(n)=\frac{n(n+1)}{2}\ .$$ I was also able to show that $$a_2(n)=\sum_{(u,v)\in R_n}uv$$ where $$R_n=[1,n]^2\cap\left\{(x,y)\in\Bbb N^2: y-x\in[1,n-1]\right\},$$ But that isn't simpler by any stretch of the imagination.

Is there a more efficient version of $(1)$? Thanks.

Edit for context:

As I said in the comments, there is no reason that I need these coefficients, I just thought it would be an interesting problem to find them. Once I found them, I wondered if there was a more efficient way of calculating them, so I asked here.

clathratus
  • 18,002

1 Answers1

0

This isn't exactly what I was looking for, but it's interesting. That's good enough for me.

We have that the Stirling numbers of the first kind $s(n,k)$ satisfy, by definition, $$g(x;n)=\prod_{k=1}^{n}(x+1-k)=\sum_{k=0}^{n}s(n,k)x^k\ .$$ But we also have that $g(x;n)=P_n(x+1)$, so we define $$\beta_k(n)=(-1)^{n-k}\sum_{U\subseteq\{1,..,n\}\\\,|U|=n-k}\prod_{u\in U}u\ ,$$ to get that $$P_n(x)=\sum_{k=0}^{n}\beta_k(n)x^k\ .$$ Thus $$\begin{align} \sum_{k=0}^{n}s(n,k)x^k&=\sum_{k=0}^{n}\beta_k(n)(x+1)^k\\ &=\sum_{k=0}^{n}\beta_k(n)\sum_{r=0}^{k}{k\choose r}x^r\\ &=\sum_{k=0}^{n}x^k\sum_{r=k}^{n}{r\choose k}\beta_{r}(n)\ , \end{align}$$ and consequently $$s(n,k)=\sum_{r=k}^{n}(-1)^{n-r}{r\choose k}\sum_{U\subseteq\{1,..,n\}\\\,|U|=n-r}\prod_{u\in U}u\ .$$

clathratus
  • 18,002