#C27.txt: May 1, 2025 Help27:=proc(): print(` NuULGe(N,r), LkT(k,N),LkUT(k,N) `):end: read `AGT.txt`: #NuULGe(N,r): The first N terms of the sequence enumerating UNLABELED GRAPHS with n vertices #and n+r edges NuULGe:=proc(N,r) local L,x,i,t: L:=[seq(CIPknC(i,x),i=1..N)]: L:=subs({seq(x[i]=1+t^i,i=1..binomial(N,2))},L): [seq(coeff(L[i],t, i+r ), i=1..N)]: end: #LkT(k,N): the first N terms of the number of ORDERED full k-ary trees with (k-1)*n+1 leaves LkT:=proc(k,N) local x,f,i,i1: f := x: for i from 1 to (k-1)*N+1 do f := expand(x+f^k); f := add(coeff(f,x,i1)*x^i1,i1=1..(k-1)*N+1) : od: [seq(coeff(f,x, (k-1)*i+1),i=1..N)] : end: #added after class #LkUT(k,N): the first N terms of the number of UNORDERED full k-ary trees with (k-1)*n+1 leaves LkUT:=proc(k,N) local x,f,i,F,X,i1; F:=CIPsn(k,X): f:=x: for i from 1 to (k-1)*N+1 do f:=x+subs({seq(X[i1]=subs(x=x^i1,f),i1=1..k)},F): f:= add(coeff(f,x,i1)*x^i1,i1=1..(k-1)*N+1): od: [seq(coeff(f,x,(k-1)*i+1),i=1..N)] : end: