# Matthew Russell # Experimental Math # Homework 27 # I give permission to post this read `public_html/em12/C27.txt`: ##################################################################################### # Finish Procedure # SSe(Se,N) # that we didn't have a chance to do in class. # SSe(Se,N): # inputs a set of non-negative integers Se, that must include 0, # and a pos. integer k, # and outputs the sequence consisting of the number of unlabelled rooted trees # with outdegree belonging to Se, with n vertices for n=1..N. # For example # SSe({0,1,2,3},10); # should output the same as # S3(10); SSe:=proc(Se,N) local T: if not member(0,Se) then return `FAIL`: fi: T:=x: pols:=CIPseq(max(Se),s): pol:=add(pols[i],i in Se minus {0}): for n from 1 to N do sublist:={seq(s[i]=subs(x=x^i,T),i=1..max(Se))}: T:=x+x*(subs(sublist,pol)): T:=add(coeff(T,x,i)*x^i,i=0..n+1): od: return [seq(coeff(T,x,i),i=1..N)]: end: ##################################################################################### # Find as many sets Se (that contain 0) for which # SSe(Se,20) # is in Sloane. # I checked all subsets of {1,2,3,4,5,6} (unioned with {0}): # {0}: A000007 # {0, 1}: A000012 # {0, 2}: A000055 (after removing extra zeros) # {0, 3}: A000598 (after removing extra zeros) # {0, 4}: A036718 (after removing extra zeros) # {0, 5}: A036721 (after removing extra zeros) # {0, 6}: A036722 (after removing extra zeros) # {0, 1, 2}: A001190 # {0, 1, 2, 3}: A000598 # {0, 1, 2, 3, 4}: A036718 # {0, 1, 2, 3, 4, 5}: A036721 (new comment needed?) # {0, 1, 2, 3, 4, 5, 6}: A036722 (new comment needed?)