10/16/2022, 07:03 AM
The Pari/GP code for Bell polynomials is
So to Mathematica code at the beginning of this thread can be migrated to Pari/GP.
Code:
Bell(k,n=-1)=
{ my(x, v, dv, var = i->eval(Str("X",i)));
v = vector(k, i, if (i==1, 'E, var(i-1)));
dv = vector(k, i, if (i==1, 'X*var(1)*'E, var(i)));
x = diffop('E,v,dv,k) / 'E;
if (n < 0, subst(x,'X,1), polcoef(x,n,'X));
}So to Mathematica code at the beginning of this thread can be migrated to Pari/GP.
Daniel

