Polynomial Sequences part 2 by I., S.

{o=c=_
for(n=NF;F=N=n--;o=(c=s*N*N/F)?o(o?c<0?FS:" +":_)c(n?"x^"n:_):o)for(s=R=0;N>R++;F*=R){for(C=d=1;d<R;C/=d++)C*=N-d
s=C*($R-=c*R^N)-s}$0=o}gsub(/1?x(.1)?/,"x")

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

download

return to the top page