#Homework by Mike Murr #OK to post #hw22 read(`C22.txt`); #TotalSYT(n) inputs a positive integer n and outputs the total number of # standard Young tableaux with n cells. # (sums up syt(L) over all members of Pn(n) TotalSYT:=proc(n) local i, partitionList, totalPartitions, onePartition, one_syt, count; partitionList:=Pn(n); #print(partitionList); totalPartitions:=nops(partitionList); #print(totalPartitions); count:=0; for i from 1 to totalPartitions do onePartition := partitionList[i]; # print(onePartition); one_syt := syt(onePartition); # print(one_syt); count := count + one_syt; od; #print(count); end proc; #TotalSYT(1); #TotalSYT(2); #TotalSYT(3); seq(TotalSYT(n),n=1..20); # Result: 1,2,4,10,26,76,232,764,2620,9496,… # # OEIS number A000085 #TotalSYTpower(n,k) inputs a positive integer n and # outputs the total number of k-tuples of standard Young # tableaux of the same shape with n cells. # (sums up (syt(L))^k over all members of Pn(n) TotalSYTpower:=proc(n,k) local i, partitionList, totalPartitions, onePartition, one_syt, count; partitionList:=Pn(n); #print(partitionList); totalPartitions:=nops(partitionList); #print(totalPartitions); count:=0; for i from 1 to totalPartitions do onePartition := partitionList[i]; # print(onePartition); one_syt := syt(onePartition); # print(one_syt); count := count + one_syt^k; od; print(count); end proc; #seq(TotalSYTpower(n,1),n=1..20); # same as above, for verification #seq(TotalSYTpower(n,2),n=1..20); # the sequence is n factorial. OEIS number A000142 #seq(TotalSYTpower(n,3),n=1..20); # 1,2,10,64,596,8056,130432,… # OEIS number A130721 #seq(TotalSYTpower(n,4),n=1..20); # 1,2,18,180,3060,101160,3807720,… # OEIS number A129627 #syt([1,1]); = 1 #syt([2,1]); = 2 #syt([3,1]); = 3 #syt([2,2]); =2 #syt([3,2]); =5 #syt([4,2]); =9 #syt([5,2]); =14 #syt([6,2]); =20 #syt([7,2]); =27 #syt([3,3]); =5 #syt([4,3]); =14 #syt([5,3]); =28 #syt([6,3]); =48 #syt([7,3]); =75 #syt([8,3]); =110 #syt([4,4]); =14 #syt([5,4]); =42 #syt([6,4]); =90 #syt([7,4]); =165 #syt([8,4]); =275 #syt([5,5]); =42 #syt([6,5]); =132 #syt([7,5]); =297 #syt([8,5]); =572