(PARI)
EulerT(v)={Vec(exp(x*Ser(dirmul(v,vector(#v,n,1/n)))-1,-#v)}
permcount(v)={my(m=1,s=0,k=0,t);对于(i=1,#v,t=v[i];k=if(i>1&&t==v[i-1],k+1,1);m*=t*k;s+=t);s!/m}
K(q,t,K)={欧拉t(Vec(总和(j=1,#q,my(g=gcd(t,q[j]));g*x^(q[j]/g))+O(x*x^K),-K))}
a(n)={如果(n==0,1,my(s=0);对于部分(q=n,my,p=sum(t=1,n,subst(x*Ser(K(q,t,n\t))/t,x,x^t)));s+=permcount(q)*polcoef(exp(p-subst\\安德鲁·豪罗伊德,2023年1月21日