PlotData[data_]:=With[{max=Max[data[[Length[data]]]]},With[{list=PlotNumbers[data,max],range=Reverse[Range[0,max]]},With[{empty=Position[list,{}]},If[empty!={},With[{newlist=Delete[list,empty],newrange=Delete[range,empty]},ListPlot[newlist,PlotMarkers->Map[ToString,newrange],PlotStyle->Reverse[ColorData[3,"ColorList"]],Axes->None,AspectRatio->2]],ListPlot[list,PlotMarkers->Map[ToString,range],PlotStyle->Reverse[ColorData[3,"ColorList"]],Axes->None,AspectRatio->2]]]]]
PlotNumbers[data_,max_]:=If[max==0,List[PlotNum[data,1,0]],Join[List[PlotNum[data,1,max]],PlotNumbers[data,max-1]]]
PlotNum[data_,row_,num_]:=If[Length[data]==1,PlotRow[data[[1]],row,1,num],If[MemberQ[First[data],num],Join[PlotRow[First[data],row,1,num],PlotNum[Rest[data],row+1,num]],PlotNum[Rest[data],row+1,num]]]
PlotRow[data_,row_,pos_,num_]:=If[Length[data]==1,PlotEntry[data[[1]],row,pos,num],Join[PlotEntry[First[data],row,pos,num],PlotRow[Rest[data],row,pos+1,num]]]
(*PlotRow[data_,row_,pos_,num_]:=If[Length[data]==1,If[data[[1]]==num,],If[]]
Map[max-#+2&,empty]*)
PlotEntry[entry_,row_,pos_,num_]:=If[entry==num,{{pos,-1*row}},{}]
(* PlotData[PartitionGeneration[31]] *)
(*** count the number of cocycles using the generating function for char 2 ***)
BuildTable[deg_,dim_]:=With[{s=Table[Series[Product[1/(1-x^(2^i)t),{i,0,j}],{x,0,deg+1},{t,0,dim+1}],{k,1,Floor[Log[2,deg]]+1}]},Table[SeriesCoefficient[s[[Floor[Log[2,i]]+1]],{x,0,i},{t,0,j}],{i,1,deg},{j,1,dim}]]
PlotData[BuildTable[64, 20]]