Polynomial Sequences part 2 by I., S.

function f(n){return n?n*f(n-1):1}function A(n,r){return(-1)^(n-r)*f(n)/f(r)/f(n-r)}{o=_
for(n=NF;n--;){for(x=s=R=0;R++<=n;)s+=A(n,R-1)*$R
o=s?o" +"(s/=f(n))"x^"n:o
for(;++x<=NF;)$x-=s*x^n}$0=o
gsub(/x.0|\^1/,_)
gsub(/\+-/,"-")
gsub(/1x/,"x")}sub(/^ \+?/,_)

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page