%% Created by Maple 9.00, Mac OS X
%% Source Worksheet: gf-constituents.latte.m.mw - /Users/zaslav/Tarticles/SLS/Maple/
%% Generated: Mon Mar 15 18:30:07 EDT 2010
\documentclass{article}
\usepackage{maple2e}
\def\emptyline{\vspace{12pt}}
\DefineParaStyle{maplegroup}
\DefineParaStyle{Author}
\DefineParaStyle{subtitle}
\DefineParaStyle{Bullet Item}
\DefineParaStyle{Dash Item}
\DefineParaStyle{Diagnostic}
\DefineParaStyle{Error}
\DefineParaStyle{Heading 1}
\DefineParaStyle{Heading 2}
\DefineParaStyle{Heading 3}
\DefineParaStyle{Heading 4}
\DefineParaStyle{Normal}
\DefineParaStyle{Text Output}
\DefineParaStyle{Title}
\DefineParaStyle{Warning}
\DefineCharStyle{2D Math}
\DefineCharStyle{Help Heading}
\DefineCharStyle{Maple Input}
\DefineCharStyle{FixedWidth}
\DefineCharStyle{endFixedWidth}
\begin{document}
\pagestyle{empty}
The number of terms to evaluate in the series expansions, to find the actual numbers of squares and symmetry types, M_c(t), m_c(t), M_a(t), m_a(t).\begin{mapleinput}
\mapleinline{active}{1d}{enddegree:=100;}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{enddegree := 100}{%
\[
{\it enddegree}\, := \,100
\]
}

\end{maplelatex}
The dimension and period for cubical magic, and the standard denominator:\begin{mapleinput}
\mapleinline{active}{1d}{d:=3;
p:=12;
cdenom:=(1-x\symbol{94}p)\symbol{94}(d+1);}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{d := 3}{%
\[
d\, := \,3
\]
}
\mapleinline{inert}{2d}{p := 12}{%
\[
p\, := \,12
\]
}
\mapleinline{inert}{2d}{cdenom := (1-x^12)^4}{%
\[
{\it cdenom}\, := \, \left( 1-{x}^{12} \right) ^{4}
\]
}

\end{maplelatex}
See Section 2.1 of "Six Little Squares". We get LattE to spit out two generating functions--one for the polytope P_c:\begin{mapleinput}
\mapleinline{active}{1d}{ehrpc:=((1) / ((((1) + (-1)*t\symbol{94}1) * (((1) + (-1)*t\symbol{94}1) * (((1) + (-1)*t\symbol{94}2) * ((1) + (-1)*t\symbol{94}4))))\symbol{94}1));}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{ehrpc := 1/((1-t)^2*(1-t^2)*(1-t^4))}{%
\[
{\it ehrpc}\, := \,{\frac {1}{ \left( 1-t \right) ^{2} \left( 1-{t}^{2} \right)  \left( 1-{t}^{4} \right) }}
\]
}

\end{maplelatex}
... and one for h intersect P_c:\begin{mapleinput}
\mapleinline{active}{1d}{ehrhc:=((1) / ((((1) + (-1)*t\symbol{94}1) * (((1) + (-1)*t\symbol{94}1) * ((1) + (-1)*t\symbol{94}6)))\symbol{94}1));}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{ehrhc := 1/((1-t)^2*(1-t^6))}{%
\[
{\it ehrhc}\, := \,{\frac {1}{ \left( 1-t \right) ^{2} \left( 1-{t}^{6} \right) }}
\]
}

\end{maplelatex}
LattE gives the closed generating functions, which we need to convert into their open counterparts:\begin{mapleinput}
\mapleinline{active}{1d}{openehrpc:=simplify(subs(t=1/x,ehrpc));}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{openehrpc := x^8/((x-1)^2*(x^2-1)*(x^4-1))}{%
\[
{\it openehrpc}\, := \,{\frac {{x}^{8}}{ \left( x-1 \right) ^{2} \left( {x}^{2}-1 \right)  \left( {x}^{4}-1 \right) }}
\]
}

\end{maplelatex}
\begin{mapleinput}
\mapleinline{active}{1d}{openehrhc:=simplify(-subs(t=1/x,ehrhc));}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{openehrhc := -x^8/((x-1)^2*(x^6-1))}{%
\[
{\it openehrhc}\, := \,-{\frac {{x}^{8}}{ \left( x-1 \right) ^{2} \left( {x}^{6}-1 \right) }}
\]
}

\end{maplelatex}
By IOP theory, the generating function for the magic quasipolynomial is\begin{mapleinput}
\mapleinline{active}{1d}{mcgfsum:=openehrpc-openehrhc;
Mcgfsum:=8*mcgfsum;}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{mcgfsum := x^8/((x-1)^2*(x^2-1)*(x^4-1))+x^8/((x-1)^2*(x^6-1))}{%
\[
{\it mcgfsum}\, := \,{\frac {{x}^{8}}{ \left( x-1 \right) ^{2} \left( {x}^{2}-1 \right)  \left( {x}^{4}-1 \right) }}+{\frac {{x}^{8}}{ \left( x-1 \right) ^{2} \left( {x}^{6}-1 \right) }}
\]
}
\mapleinline{inert}{2d}{Mcgfsum := 8*x^8/((x-1)^2*(x^2-1)*(x^4-1))+8*x^8/((x-1)^2*(x^6-1))}{%
\[
{\it Mcgfsum}\, := \,8\,{\frac {{x}^{8}}{ \left( x-1 \right) ^{2} \left( {x}^{2}-1 \right)  \left( {x}^{4}-1 \right) }}+8\,{\frac {{x}^{8}}{ \left( x-1 \right) ^{2} \left( {x}^{6}-1 \right) }}
\]
}

\end{maplelatex}
\begin{mapleinput}
\mapleinline{active}{1d}{Mcgfs:=simplify(Mcgfsum);
mcgfs:=simplify(mcgfsum);}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Mcgfs := 8*x^10*(2*x^2+1)/((x^6-1)*(x^4-1)*(x-1)^2)}{%
\[
{\it Mcgfs}\, := \,8\,{\frac {{x}^{10} \left( 2\,{x}^{2}+1 \right) }{ \left( {x}^{6}-1 \right)  \left( {x}^{4}-1 \right)  \left( x-1 \right) ^{2}}}
\]
}
\mapleinline{inert}{2d}{mcgfs := x^10*(2*x^2+1)/((x^6-1)*(x^4-1)*(x-1)^2)}{%
\[
{\it mcgfs}\, := \,{\frac {{x}^{10} \left( 2\,{x}^{2}+1 \right) }{ \left( {x}^{6}-1 \right)  \left( {x}^{4}-1 \right)  \left( x-1 \right) ^{2}}}
\]
}

\end{maplelatex}
Now we bring the total generating function into "normalized form" with denominator "cdenom"...\begin{mapleinput}
\mapleinline{active}{1d}{num:=numer(Mcgfs):
den:=denom(Mcgfs):}{}
\end{mapleinput}\begin{mapleinput}
\mapleinline{active}{1d}{Magicnum:=expand(simplify(cdenom/den)*num):
Mcgf:=Magicnum/cdenom;}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Mcgf := (320*x^18+40*x^12+128*x^15+80*x^45+16*x^48+896*x^24+608*x^21+776*x^36+1184*x^30+1040*x^33+1136*x^27+464*x^39+224*x^42+8*x^10+16*x^11+712*x^22+504*x^20+400*x^19+240*x^17+184*x^16+96*x^14+64*x^13+1168*x^28+976*x^25+1056*x^26+816*x^23+952*x^34+1104*x^32+1168*x^31+1200*x^29+864*x^35+576*x^38+688*x^37+56*x^46+376*x^40+160*x^43+120*x^44+288*x^41+32*x^47)/(1-x^12)^4}{%
${\it Mcgf}\, := \,{\frac {320\,{x}^{18}+40\,{x}^{12}+128\,{x}^{15}+80\,{x}^{45}+16\,{x}^{48}+896\,{x}^{24}+608\,{x}^{21}+776\,{x}^{36}+1184\,{x}^{30}\\
\mbox{}+1040\,{x}^{33}+1136\,{x}^{27}+464\,{x}^{39}+224\,{x}^{42}+8\,{x}^{10}+16\,{x}^{11}+712\,{x}^{22}+504\,{x}^{20}+400\,{x}^{19}\\
\mbox{}+240\,{x}^{17}+184\,{x}^{16}+96\,{x}^{14}+64\,{x}^{13}+1168\,{x}^{28}+976\,{x}^{25}+1056\,{x}^{26}+816\,{x}^{23}+952\,{x}^{34}\\
\mbox{}+1104\,{x}^{32}+1168\,{x}^{31}+1200\,{x}^{29}+864\,{x}^{35}+576\,{x}^{38}+688\,{x}^{37}+56\,{x}^{46}+376\,{x}^{40}\\
\mbox{}+160\,{x}^{43}+120\,{x}^{44}+288\,{x}^{41}+32\,{x}^{47}}{ \left( 1-{x}^{12} \right) ^{4}}}$}

\end{maplelatex}
And the symmetry-type generating function ...\begin{mapleinput}
\mapleinline{active}{1d}{num:=numer(mcgfs):
den:=denom(mcgfs):}{}
\end{mapleinput}\begin{mapleinput}
\mapleinline{active}{1d}{magicnum:=(expand(simplify(cdenom/den)*num)):
mcgf:=magicnum/cdenom;}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{mcgf := (40*x^18+5*x^12+16*x^15+10*x^45+2*x^48+112*x^24+76*x^21+97*x^36+148*x^30+130*x^33+142*x^27+58*x^39+28*x^42+x^10+2*x^11+89*x^22+63*x^20+50*x^19+30*x^17+23*x^16+12*x^14+8*x^13+146*x^28+122*x^25+132*x^26+102*x^23+119*x^34+138*x^32+146*x^31+150*x^29+108*x^35+72*x^38+86*x^37+7*x^46+47*x^40+20*x^43+15*x^44+36*x^41+4*x^47)/(1-x^12)^4}{%
${\it mcgf}\, := \,{\frac {40\,{x}^{18}+5\,{x}^{12}+16\,{x}^{15}+10\,{x}^{45}+2\,{x}^{48}+112\,{x}^{24}+76\,{x}^{21}+97\,{x}^{36}+148\,{x}^{30}+130\,{x}^{33}\\
\mbox{}+142\,{x}^{27}+58\,{x}^{39}+28\,{x}^{42}+{x}^{10}+2\,{x}^{11}+89\,{x}^{22}+63\,{x}^{20}+50\,{x}^{19}+30\,{x}^{17}+23\,{x}^{16}+12\,{x}^{14}\\
\mbox{}+8\,{x}^{13}+146\,{x}^{28}+122\,{x}^{25}+132\,{x}^{26}+102\,{x}^{23}+119\,{x}^{34}+138\,{x}^{32}+146\,{x}^{31}+150\,{x}^{29}\\
\mbox{}+108\,{x}^{35}+72\,{x}^{38}+86\,{x}^{37}+7\,{x}^{46}+47\,{x}^{40}+20\,{x}^{43}+15\,{x}^{44}+36\,{x}^{41}+4\,{x}^{47}}{ \left( 1-{x}^{12}\\
\mbox{} \right) ^{4}}}$}

\end{maplelatex}
Let's check the first few terms...\begin{mapleinput}
\mapleinline{active}{1d}{Mcgfseries:=series(Mcgf,x=0,enddegree+1);}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Mcgfseries := series(8*x^10+16*x^11+40*x^12+64*x^13+96*x^14+128*x^15+184*x^16+240*x^17+320*x^18+400*x^19+504*x^20+608*x^21+744*x^22+880*x^23+1056*x^24+1232*x^25+1440*x^26+1648*x^27+1904*x^28+2160*x^29+2464*x^30+2768*x^31+3120*x^32+3472*x^33+3880*x^34+4288*x^35+4760*x^36+5232*x^37+5760*x^38+6288*x^39+6888*x^40+7488*x^41+8160*x^42+8832*x^43+9576*x^44+10320*x^45+11144*x^46+11968*x^47+12880*x^48+13792*x^49+14784*x^50+15776*x^51+16864*x^52+17952*x^53+19136*x^54+20320*x^55+21600*x^56+22880*x^57+24264*x^58+25648*x^59+27144*x^60+28640*x^61+30240*x^62+31840*x^63+33560*x^64+35280*x^65+37120*x^66+38960*x^67+40920*x^68+42880*x^69+44968*x^70+47056*x^71+49280*x^72+51504*x^73+53856*x^74+56208*x^75+58704*x^76+61200*x^77+63840*x^78+66480*x^79+69264*x^80+72048*x^81+74984*x^82+77920*x^83+81016*x^84+84112*x^85+87360*x^86+90608*x^87+94024*x^88+97440*x^89+101024*x^90+104608*x^91+108360*x^92+112112*x^93+116040*x^94+119968*x^95+124080*x^96+128192*x^97+132480*x^98+136768*x^99+141248*x^100+O(x^101),x,101)}{%
${\it Mcgfseries}\, := \,{\it series} \left( 72048\,{x}^{81}+74984\,{x}^{82}+77920\,{x}^{83}+49280\,{x}^{72}+51504\,{x}^{73}\\
\mbox{}+53856\,{x}^{74}+320\,{x}^{18}+40\,{x}^{12}+128\,{x}^{15}+56208\,{x}^{75}+58704\,{x}^{76}+61200\,{x}^{77}\\
\mbox{}+15776\,{x}^{51}+10320\,{x}^{45}+12880\,{x}^{48}+1056\,{x}^{24}+608\,{x}^{21}+4760\,{x}^{36}+2464\,{x}^{30}\\
\mbox{}+3472\,{x}^{33}+1648\,{x}^{27}+6288\,{x}^{39}+8160\,{x}^{42}+19136\,{x}^{54}+42880\,{x}^{69}+44968\,{x}^{70}\\
\mbox{}+47056\,{x}^{71}+8\,{x}^{10}+16\,{x}^{11}+744\,{x}^{22}+504\,{x}^{20}+400\,{x}^{19}+240\,{x}^{17}+184\,{x}^{16}+96\,{x}^{14}\\
\mbox{}+64\,{x}^{13}+37120\,{x}^{66}+38960\,{x}^{67}+40920\,{x}^{68}+1904\,{x}^{28}+1232\,{x}^{25}+1440\,{x}^{26}\\
\mbox{}+880\,{x}^{23}+3880\,{x}^{34}+3120\,{x}^{32}+2768\,{x}^{31}+2160\,{x}^{29}+4288\,{x}^{35}+5760\,{x}^{38}+5232\,{x}^{37}\\
\mbox{}+11144\,{x}^{46}+6888\,{x}^{40}+8832\,{x}^{43}+9576\,{x}^{44}+7488\,{x}^{41}+11968\,{x}^{47}+136768\,{x}^{99}\\
\mbox{}+81016\,{x}^{84}+84112\,{x}^{85}+87360\,{x}^{86}+90608\,{x}^{87}+13792\,{x}^{49}+14784\,{x}^{50}+16864\,{x}^{52}\\
\mbox{}+17952\,{x}^{53}+20320\,{x}^{55}+21600\,{x}^{56}+22880\,{x}^{57}+24264\,{x}^{58}+25648\,{x}^{59}+27144\,{x}^{60}\\
\mbox{}+28640\,{x}^{61}+30240\,{x}^{62}+31840\,{x}^{63}+33560\,{x}^{64}+35280\,{x}^{65}+108360\,{x}^{92}\\
\mbox{}+116040\,{x}^{94}+119968\,{x}^{95}+124080\,{x}^{96}+112112\,{x}^{93}+63840\,{x}^{78}+66480\,{x}^{79}\\
\mbox{}+69264\,{x}^{80}+94024\,{x}^{88}+97440\,{x}^{89}+101024\,{x}^{90}+104608\,{x}^{91}+128192\,{x}^{97}\\
\mbox{}+132480\,{x}^{98}+141248\,{x}^{100}+O \left( {x}^{101} \right) ,x,101 \right) $}

\end{maplelatex}
\begin{mapleinput}
\mapleinline{active}{1d}{mcgfseries:=series(mcgf,x=0,enddegree+1);}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{mcgfseries := series(x^10+2*x^11+5*x^12+8*x^13+12*x^14+16*x^15+23*x^16+30*x^17+40*x^18+50*x^19+63*x^20+76*x^21+93*x^22+110*x^23+132*x^24+154*x^25+180*x^26+206*x^27+238*x^28+270*x^29+308*x^30+346*x^31+390*x^32+434*x^33+485*x^34+536*x^35+595*x^36+654*x^37+720*x^38+786*x^39+861*x^40+936*x^41+1020*x^42+1104*x^43+1197*x^44+1290*x^45+1393*x^46+1496*x^47+1610*x^48+1724*x^49+1848*x^50+1972*x^51+2108*x^52+2244*x^53+2392*x^54+2540*x^55+2700*x^56+2860*x^57+3033*x^58+3206*x^59+3393*x^60+3580*x^61+3780*x^62+3980*x^63+4195*x^64+4410*x^65+4640*x^66+4870*x^67+5115*x^68+5360*x^69+5621*x^70+5882*x^71+6160*x^72+6438*x^73+6732*x^74+7026*x^75+7338*x^76+7650*x^77+7980*x^78+8310*x^79+8658*x^80+9006*x^81+9373*x^82+9740*x^83+10127*x^84+10514*x^85+10920*x^86+11326*x^87+11753*x^88+12180*x^89+12628*x^90+13076*x^91+13545*x^92+14014*x^93+14505*x^94+14996*x^95+15510*x^96+16024*x^97+16560*x^98+17096*x^99+17656*x^100+O(x^101),x,101)}{%
${\it mcgfseries}\, := \,{\it series} \left( 9006\,{x}^{81}+9373\,{x}^{82}+9740\,{x}^{83}+6160\,{x}^{72}+6438\,{x}^{73}\\
\mbox{}+6732\,{x}^{74}+40\,{x}^{18}+5\,{x}^{12}+16\,{x}^{15}+7026\,{x}^{75}+7338\,{x}^{76}+7650\,{x}^{77}+1972\,{x}^{51}\\
\mbox{}+1290\,{x}^{45}+1610\,{x}^{48}+132\,{x}^{24}+76\,{x}^{21}+595\,{x}^{36}+308\,{x}^{30}+434\,{x}^{33}+206\,{x}^{27}\\
\mbox{}+786\,{x}^{39}+1020\,{x}^{42}+2392\,{x}^{54}+5360\,{x}^{69}+5621\,{x}^{70}+5882\,{x}^{71}+{x}^{10}+2\,{x}^{11}+93\,{x}^{22}\\
\mbox{}+63\,{x}^{20}+50\,{x}^{19}+30\,{x}^{17}+23\,{x}^{16}+12\,{x}^{14}+8\,{x}^{13}+4640\,{x}^{66}+4870\,{x}^{67}+5115\,{x}^{68}\\
\mbox{}+238\,{x}^{28}+154\,{x}^{25}+180\,{x}^{26}+110\,{x}^{23}+485\,{x}^{34}+390\,{x}^{32}+346\,{x}^{31}+270\,{x}^{29}+536\,{x}^{35}\\
\mbox{}+720\,{x}^{38}+654\,{x}^{37}+1393\,{x}^{46}+861\,{x}^{40}+1104\,{x}^{43}+1197\,{x}^{44}+936\,{x}^{41}+1496\,{x}^{47}\\
\mbox{}+17096\,{x}^{99}+10127\,{x}^{84}+10514\,{x}^{85}+10920\,{x}^{86}+11326\,{x}^{87}+1724\,{x}^{49}+1848\,{x}^{50}\\
\mbox{}+2108\,{x}^{52}+2244\,{x}^{53}+2540\,{x}^{55}+2700\,{x}^{56}+2860\,{x}^{57}+3033\,{x}^{58}+3206\,{x}^{59}\\
\mbox{}+3393\,{x}^{60}+3580\,{x}^{61}+3780\,{x}^{62}+3980\,{x}^{63}+4195\,{x}^{64}+4410\,{x}^{65}+13545\,{x}^{92}\\
\mbox{}+14505\,{x}^{94}+14996\,{x}^{95}+15510\,{x}^{96}+14014\,{x}^{93}+7980\,{x}^{78}+8310\,{x}^{79}+8658\,{x}^{80}\\
\mbox{}+11753\,{x}^{88}+12180\,{x}^{89}+12628\,{x}^{90}+13076\,{x}^{91}+16024\,{x}^{97}+16560\,{x}^{98}+17656\,{x}^{100}\\
\mbox{}+O \left( {x}^{101} \right) ,x,101 \right) $}

\end{maplelatex}
So here are the constituents of the cubic total-count quasipolynomial (starting with the 0th constituent); also with denominator cleared and factored when possible:\begin{mapleinput}
\mapleinline{active}{1d}{Mcconstituent[0]:=expand(sum(coeff(Magicnum,x,p*j)*binomial(d+t/p-j,d),j=1..d+1));
6*%;
factor(%);}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Mcconstituent[0] := 38/3*t-8/3*t^2+1/6*t^3-16}{%
\[
{\it Mcconstituent}_{{0}}\, := \,{\frac {38}{3}}\,t-8/3\,{t}^{2}+1/6\,{t}^{3}-16
\]
}
\mapleinline{inert}{2d}{76*t-16*t^2+t^3-96}{%
\[
76\,t-16\,{t}^{2}+{t}^{3}-96
\]
}
\mapleinline{inert}{2d}{(t-6)*(t-2)*(t-8)}{%
\[
 \left( t-6 \right)  \left( t-2 \right)  \left( t-8 \right) 
\]
}

\end{maplelatex}
\begin{mapleinput}
\mapleinline{active}{1d}{for r from 1 to p do
  Mcconstituent[r]:=expand(sum(coeff(Magicnum,x,p*j+r)*binomial(d+(t-r)/p-j,d),j=0..d));
  6*Mcconstituent[r];
  factor(%);
od;}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Mcconstituent[1] := 73/6*t-8/3*t^2+1/6*t^3-29/3}{%
\[
{\it Mcconstituent}_{{1}}\, := \,{\frac {73}{6}}\,t-8/3\,{t}^{2}+1/6\,{t}^{3}-{\frac {29}{3}}
\]
}
\mapleinline{inert}{2d}{73*t-16*t^2+t^3-58}{%
\[
73\,t-16\,{t}^{2}+{t}^{3}-58
\]
}
\mapleinline{inert}{2d}{(t-1)*(t^2-15*t+58)}{%
\[
 \left( t-1 \right)  \left( {t}^{2}-15\,t+58 \right) 
\]
}
\mapleinline{inert}{2d}{Mcconstituent[2] := 38/3*t-8/3*t^2+1/6*t^3-16}{%
\[
{\it Mcconstituent}_{{2}}\, := \,{\frac {38}{3}}\,t-8/3\,{t}^{2}+1/6\,{t}^{3}-16
\]
}
\mapleinline{inert}{2d}{76*t-16*t^2+t^3-96}{%
\[
76\,t-16\,{t}^{2}+{t}^{3}-96
\]
}
\mapleinline{inert}{2d}{(t-6)*(t-2)*(t-8)}{%
\[
 \left( t-6 \right)  \left( t-2 \right)  \left( t-8 \right) 
\]
}
\mapleinline{inert}{2d}{Mcconstituent[3] := 73/6*t-8/3*t^2+1/6*t^3-17}{%
\[
{\it Mcconstituent}_{{3}}\, := \,{\frac {73}{6}}\,t-8/3\,{t}^{2}+1/6\,{t}^{3}-17
\]
}
\mapleinline{inert}{2d}{73*t-16*t^2+t^3-102}{%
\[
73\,t-16\,{t}^{2}+{t}^{3}-102
\]
}
\mapleinline{inert}{2d}{(t-3)*(t^2-13*t+34)}{%
\[
 \left( t-3 \right)  \left( {t}^{2}-13\,t+34 \right) 
\]
}
\mapleinline{inert}{2d}{Mcconstituent[4] := 38/3*t-8/3*t^2+1/6*t^3-56/3}{%
\[
{\it Mcconstituent}_{{4}}\, := \,{\frac {38}{3}}\,t-8/3\,{t}^{2}+1/6\,{t}^{3}-{\frac {56}{3}}
\]
}
\mapleinline{inert}{2d}{76*t-16*t^2+t^3-112}{%
\[
76\,t-16\,{t}^{2}+{t}^{3}-112
\]
}
\mapleinline{inert}{2d}{(t-4)*(t^2-12*t+28)}{%
\[
 \left( t-4 \right)  \left( {t}^{2}-12\,t+28 \right) 
\]
}
\mapleinline{inert}{2d}{Mcconstituent[5] := 73/6*t-8/3*t^2+1/6*t^3-15}{%
\[
{\it Mcconstituent}_{{5}}\, := \,{\frac {73}{6}}\,t-8/3\,{t}^{2}+1/6\,{t}^{3}-15
\]
}
\mapleinline{inert}{2d}{73*t-16*t^2+t^3-90}{%
\[
73\,t-16\,{t}^{2}+{t}^{3}-90
\]
}
\mapleinline{inert}{2d}{(t-5)*(t-2)*(t-9)}{%
\[
 \left( t-5 \right)  \left( t-2 \right)  \left( t-9 \right) 
\]
}
\mapleinline{inert}{2d}{Mcconstituent[6] := 38/3*t-8/3*t^2+1/6*t^3-16}{%
\[
{\it Mcconstituent}_{{6}}\, := \,{\frac {38}{3}}\,t-8/3\,{t}^{2}+1/6\,{t}^{3}-16
\]
}
\mapleinline{inert}{2d}{76*t-16*t^2+t^3-96}{%
\[
76\,t-16\,{t}^{2}+{t}^{3}-96
\]
}
\mapleinline{inert}{2d}{(t-6)*(t-2)*(t-8)}{%
\[
 \left( t-6 \right)  \left( t-2 \right)  \left( t-8 \right) 
\]
}
\mapleinline{inert}{2d}{Mcconstituent[7] := 73/6*t-8/3*t^2+1/6*t^3-35/3}{%
\[
{\it Mcconstituent}_{{7}}\, := \,{\frac {73}{6}}\,t-8/3\,{t}^{2}+1/6\,{t}^{3}-{\frac {35}{3}}
\]
}
\mapleinline{inert}{2d}{73*t-16*t^2+t^3-70}{%
\[
73\,t-16\,{t}^{2}+{t}^{3}-70
\]
}

\end{maplelatex}

\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{(t-7)*(t^2-9*t+10)}{%
\[
 \left( t-7 \right)  \left( {t}^{2}-9\,t+10 \right) 
\]
}
\mapleinline{inert}{2d}{Mcconstituent[8] := 38/3*t-8/3*t^2+1/6*t^3-16}{%
\[
{\it Mcconstituent}_{{8}}\, := \,{\frac {38}{3}}\,t-8/3\,{t}^{2}+1/6\,{t}^{3}-16
\]
}
\mapleinline{inert}{2d}{76*t-16*t^2+t^3-96}{%
\[
76\,t-16\,{t}^{2}+{t}^{3}-96
\]
}
\mapleinline{inert}{2d}{(t-6)*(t-2)*(t-8)}{%
\[
 \left( t-6 \right)  \left( t-2 \right)  \left( t-8 \right) 
\]
}
\mapleinline{inert}{2d}{Mcconstituent[9] := 73/6*t-8/3*t^2+1/6*t^3-15}{%
\[
{\it Mcconstituent}_{{9}}\, := \,{\frac {73}{6}}\,t-8/3\,{t}^{2}+1/6\,{t}^{3}-15
\]
}
\mapleinline{inert}{2d}{73*t-16*t^2+t^3-90}{%
\[
73\,t-16\,{t}^{2}+{t}^{3}-90
\]
}
\mapleinline{inert}{2d}{(t-5)*(t-2)*(t-9)}{%
\[
 \left( t-5 \right)  \left( t-2 \right)  \left( t-9 \right) 
\]
}
\mapleinline{inert}{2d}{Mcconstituent[10] := 38/3*t-8/3*t^2+1/6*t^3-56/3}{%
\[
{\it Mcconstituent}_{{10}}\, := \,{\frac {38}{3}}\,t-8/3\,{t}^{2}+1/6\,{t}^{3}-{\frac {56}{3}}
\]
}
\mapleinline{inert}{2d}{76*t-16*t^2+t^3-112}{%
\[
76\,t-16\,{t}^{2}+{t}^{3}-112
\]
}
\mapleinline{inert}{2d}{(t-4)*(t^2-12*t+28)}{%
\[
 \left( t-4 \right)  \left( {t}^{2}-12\,t+28 \right) 
\]
}
\mapleinline{inert}{2d}{Mcconstituent[11] := 73/6*t-8/3*t^2+1/6*t^3-17}{%
\[
{\it Mcconstituent}_{{11}}\, := \,{\frac {73}{6}}\,t-8/3\,{t}^{2}+1/6\,{t}^{3}-17
\]
}

\end{maplelatex}

\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{73*t-16*t^2+t^3-102}{%
\[
73\,t-16\,{t}^{2}+{t}^{3}-102
\]
}
\mapleinline{inert}{2d}{(t-3)*(t^2-13*t+34)}{%
\[
 \left( t-3 \right)  \left( {t}^{2}-13\,t+34 \right) 
\]
}
\mapleinline{inert}{2d}{Mcconstituent[12] := 38/3*t-8/3*t^2+1/6*t^3-16}{%
\[
{\it Mcconstituent}_{{12}}\, := \,{\frac {38}{3}}\,t-8/3\,{t}^{2}+1/6\,{t}^{3}-16
\]
}
\mapleinline{inert}{2d}{76*t-16*t^2+t^3-96}{%
\[
76\,t-16\,{t}^{2}+{t}^{3}-96
\]
}
\mapleinline{inert}{2d}{(t-6)*(t-2)*(t-8)}{%
\[
 \left( t-6 \right)  \left( t-2 \right)  \left( t-8 \right) 
\]
}

\end{maplelatex}
And here are the constituents of the cubic symmetry-class quasipolynomial (starting with the 0th constituent) (which will be 1/8 those of the total count):\begin{mapleinput}
\mapleinline{active}{1d}{mcconstituent[0]:=expand(sum(coeff(magicnum,x,p*j)*binomial(d+t/p-j,d),j=1..d+1));
}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{mcconstituent[0] := 19/12*t-1/3*t^2+1/48*t^3-2}{%
\[
{\it mcconstituent}_{{0}}\, := \,{\frac {19}{12}}\,t-1/3\,{t}^{2}+1/48\,{t}^{3}-2
\]
}

\end{maplelatex}
\begin{mapleinput}
\mapleinline{active}{1d}{for r from 1 to p do
  mcconstituent[r]:=expand(sum(coeff(magicnum,x,p*j+r)*binomial(d+(t-r)/p-j,d),j=0..d));
od;}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{mcconstituent[1] := 73/48*t-1/3*t^2+1/48*t^3-29/24}{%
\[
{\it mcconstituent}_{{1}}\, := \,{\frac {73}{48}}\,t-1/3\,{t}^{2}+1/48\,{t}^{3}-{\frac {29}{24}}
\]
}
\mapleinline{inert}{2d}{mcconstituent[2] := 19/12*t-1/3*t^2+1/48*t^3-2}{%
\[
{\it mcconstituent}_{{2}}\, := \,{\frac {19}{12}}\,t-1/3\,{t}^{2}+1/48\,{t}^{3}-2
\]
}
\mapleinline{inert}{2d}{mcconstituent[3] := 73/48*t-1/3*t^2+1/48*t^3-17/8}{%
\[
{\it mcconstituent}_{{3}}\, := \,{\frac {73}{48}}\,t-1/3\,{t}^{2}+1/48\,{t}^{3}-{\frac {17}{8}}
\]
}
\mapleinline{inert}{2d}{mcconstituent[4] := 19/12*t-1/3*t^2+1/48*t^3-7/3}{%
\[
{\it mcconstituent}_{{4}}\, := \,{\frac {19}{12}}\,t-1/3\,{t}^{2}+1/48\,{t}^{3}-7/3
\]
}
\mapleinline{inert}{2d}{mcconstituent[5] := 73/48*t-1/3*t^2+1/48*t^3-15/8}{%
\[
{\it mcconstituent}_{{5}}\, := \,{\frac {73}{48}}\,t-1/3\,{t}^{2}+1/48\,{t}^{3}-{\frac {15}{8}}
\]
}
\mapleinline{inert}{2d}{mcconstituent[6] := 19/12*t-1/3*t^2+1/48*t^3-2}{%
\[
{\it mcconstituent}_{{6}}\, := \,{\frac {19}{12}}\,t-1/3\,{t}^{2}+1/48\,{t}^{3}-2
\]
}
\mapleinline{inert}{2d}{mcconstituent[7] := 73/48*t-1/3*t^2+1/48*t^3-35/24}{%
\[
{\it mcconstituent}_{{7}}\, := \,{\frac {73}{48}}\,t-1/3\,{t}^{2}+1/48\,{t}^{3}-{\frac {35}{24}}
\]
}
\mapleinline{inert}{2d}{mcconstituent[8] := 19/12*t-1/3*t^2+1/48*t^3-2}{%
\[
{\it mcconstituent}_{{8}}\, := \,{\frac {19}{12}}\,t-1/3\,{t}^{2}+1/48\,{t}^{3}-2
\]
}
\mapleinline{inert}{2d}{mcconstituent[9] := 73/48*t-1/3*t^2+1/48*t^3-15/8}{%
\[
{\it mcconstituent}_{{9}}\, := \,{\frac {73}{48}}\,t-1/3\,{t}^{2}+1/48\,{t}^{3}-{\frac {15}{8}}
\]
}

\end{maplelatex}

\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{mcconstituent[10] := 19/12*t-1/3*t^2+1/48*t^3-7/3}{%
\[
{\it mcconstituent}_{{10}}\, := \,{\frac {19}{12}}\,t-1/3\,{t}^{2}+1/48\,{t}^{3}-7/3
\]
}
\mapleinline{inert}{2d}{mcconstituent[11] := 73/48*t-1/3*t^2+1/48*t^3-17/8}{%
\[
{\it mcconstituent}_{{11}}\, := \,{\frac {73}{48}}\,t-1/3\,{t}^{2}+1/48\,{t}^{3}-{\frac {17}{8}}
\]
}
\mapleinline{inert}{2d}{mcconstituent[12] := 19/12*t-1/3*t^2+1/48*t^3-2}{%
\[
{\it mcconstituent}_{{12}}\, := \,{\frac {19}{12}}\,t-1/3\,{t}^{2}+1/48\,{t}^{3}-2
\]
}

\end{maplelatex}
Test the cubic total-count constituents up to "enddegree".  Print any n that give wrong evaluation.\begin{mapleinput}
\mapleinline{active}{1d}{print("Test cubic constituents; print any inconsistent evaluations.");
for n from 1 to enddegree do
  r:=modp(n,p);
  value:=eval(Mcconstituent[r],t=n);
  term:=coeff(Mcgfseries,x,n);
  if ( value-term <\TEXTsymbol{>} 0 ) then print(n,r,value,term,value-term); fi;
od:
print("Values checked from 1 to", enddegree);
  }{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{"Test cubic constituents; print any inconsistent evaluations."}{%
$\mbox {{\tt ``Test cubic constituents; print any inconsistent evaluations.''}}$}
\mapleinline{inert}{2d}{"Values checked from 1 to", 100}{%
$\mbox {{\tt ``Values checked from 1 to''}},\,100$}

\end{maplelatex}
First, the generating functions of R_mc(n) and r_mc(n).  The conversion factor is:\begin{mapleinput}
\mapleinline{active}{1d}{rmultiplier:=x\symbol{94}2/(1-x)\symbol{94}2:}{}
\end{mapleinput}\begin{mapleinput}
\mapleinline{active}{1d}{Rgfs:=simplify(Mcgfs/rmultiplier); 
rgfs:=simplify(mcgfs/rmultiplier); }{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Rgfs := 8*(2*x^2+1)*x^8/((x-1)^2*(x^3+x^2+x+1)*(x^5+x^4+x^3+x^2+x+1))}{%
${\it Rgfs}\, := \,8\,{\frac { \left( 2\,{x}^{2}+1 \right) {x}^{8}}{ \left( x-1 \right) ^{2} \left( {x}^{3}+{x}^{2}+x+1 \right)  \left( {x}^{5}+{x}^{4}+{x}^{3}+{x}^{2}+x+1 \right) \\
\mbox{}}}$}
\mapleinline{inert}{2d}{rgfs := (2*x^2+1)*x^8/((x-1)^2*(x^3+x^2+x+1)*(x^5+x^4+x^3+x^2+x+1))}{%
\[
{\it rgfs}\, := \,{\frac { \left( 2\,{x}^{2}+1 \right) {x}^{8}}{ \left( x-1 \right) ^{2} \left( {x}^{3}+{x}^{2}+x+1 \right)  \left( {x}^{5}+{x}^{4}+{x}^{3}+{x}^{2}+x+1 \right) }}
\]
}

\end{maplelatex}
Now standardize the denominator.  dr = the degree for reduced squares.\begin{mapleinput}
\mapleinline{active}{1d}{dr:=1;
rdenom:=(1-x\symbol{94}p)\symbol{94}(dr+1);}{}
\end{mapleinput}\begin{mapleinput}
\mapleinline{active}{1d}{num:=numer(Rgfs):
den:=denom(Rgfs):}{}
\end{mapleinput}\begin{mapleinput}
\mapleinline{active}{1d}{Rmagicnum:=simplify(rdenom/den)*num:
Rgf:=Rmagicnum/rdenom;}{}
\end{mapleinput}\begin{mapleinput}
\mapleinline{active}{1d}{num:=numer(rgfs):
den:=denom(rgfs):}{}
\end{mapleinput}\begin{mapleinput}
\mapleinline{active}{1d}{rmagicnum:=simplify(rdenom/den)*num:
rgf:=rmagicnum/rdenom;}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{dr := 1}{%
\[
{\it dr}\, := \,1
\]
}
\mapleinline{inert}{2d}{rdenom := (1-x^12)^2}{%
\[
{\it rdenom}\, := \, \left( 1-{x}^{12} \right) ^{2}
\]
}
\mapleinline{inert}{2d}{Rgf := 8*(x^10+x^8+x^6+x^4+x^2+1)*(x^4-x^2+1)*(2*x^2+1)*x^8/(1-x^12)^2}{%
${\it Rgf}\, := \,8\,{\frac { \left( {x}^{10}+{x}^{8}+{x}^{6}+{x}^{4}+{x}^{2}+1 \right)  \left( {x}^{4}-{x}^{2}+1 \right)  \left( 2\,{x}^{2}+1 \right) \\
\mbox{}{x}^{8}}{ \left( 1-{x}^{12} \right) ^{2}}}$}
\mapleinline{inert}{2d}{rgf := (x^10+x^8+x^6+x^4+x^2+1)*(x^4-x^2+1)*(2*x^2+1)*x^8/(1-x^12)^2}{%
${\it rgf}\, := \,{\frac { \left( {x}^{10}+{x}^{8}+{x}^{6}+{x}^{4}+{x}^{2}+1 \right)  \left( {x}^{4}-{x}^{2}+1 \right)  \left( 2\,{x}^{2}+1 \right) \\
\mbox{}{x}^{8}}{ \left( 1-{x}^{12} \right) ^{2}}}$}

\end{maplelatex}
Let's check the first few terms...\begin{mapleinput}
\mapleinline{active}{1d}{Rgfseries:=series(Rgf,x=0,enddegree+1);}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Rgfseries := series(8*x^8+16*x^10+8*x^12+24*x^14+24*x^16+24*x^18+32*x^20+40*x^22+32*x^24+48*x^26+48*x^28+48*x^30+56*x^32+64*x^34+56*x^36+72*x^38+72*x^40+72*x^42+80*x^44+88*x^46+80*x^48+96*x^50+96*x^52+96*x^54+104*x^56+112*x^58+104*x^60+120*x^62+120*x^64+120*x^66+128*x^68+136*x^70+128*x^72+144*x^74+144*x^76+144*x^78+152*x^80+160*x^82+152*x^84+168*x^86+168*x^88+168*x^90+176*x^92+184*x^94+176*x^96+192*x^98+192*x^100+O(x^102),x,102)}{%
${\it Rgfseries}\, := \,{\it series} \left( 24\,{x}^{18}+8\,{x}^{12}+80\,{x}^{48}+32\,{x}^{24}+56\,{x}^{36}+48\,{x}^{30}+72\,{x}^{42}+96\,{x}^{54}\\
\mbox{}+8\,{x}^{8}+16\,{x}^{10}+168\,{x}^{88}+40\,{x}^{22}+32\,{x}^{20}+24\,{x}^{16}+24\,{x}^{14}+48\,{x}^{28}+48\,{x}^{26}+64\,{x}^{34}\\
\mbox{}+56\,{x}^{32}+72\,{x}^{38}+88\,{x}^{46}+72\,{x}^{40}+80\,{x}^{44}+96\,{x}^{50}+96\,{x}^{52}+104\,{x}^{56}+112\,{x}^{58}+O \left( {x}^{102} \right) \\
\mbox{}+184\,{x}^{94}+192\,{x}^{98}+192\,{x}^{100}+176\,{x}^{96}+152\,{x}^{84}+168\,{x}^{90}+176\,{x}^{92}+168\,{x}^{86}\\
\mbox{}+144\,{x}^{76}+152\,{x}^{80}+160\,{x}^{82}+144\,{x}^{78}+128\,{x}^{68}+128\,{x}^{72}+144\,{x}^{74}+136\,{x}^{70}+104\,{x}^{60}\\
\mbox{}+120\,{x}^{64}+120\,{x}^{66}+120\,{x}^{62},x,102 \right) $}

\end{maplelatex}
\begin{mapleinput}
\mapleinline{active}{1d}{rgfseries:=series(rgf,x=0,enddegree+1);}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{rgfseries := series(x^8+2*x^10+x^12+3*x^14+3*x^16+3*x^18+4*x^20+5*x^22+4*x^24+6*x^26+6*x^28+6*x^30+7*x^32+8*x^34+7*x^36+9*x^38+9*x^40+9*x^42+10*x^44+11*x^46+10*x^48+12*x^50+12*x^52+12*x^54+13*x^56+14*x^58+13*x^60+15*x^62+15*x^64+15*x^66+16*x^68+17*x^70+16*x^72+18*x^74+18*x^76+18*x^78+19*x^80+20*x^82+19*x^84+21*x^86+21*x^88+21*x^90+22*x^92+23*x^94+22*x^96+24*x^98+24*x^100+O(x^102),x,102)}{%
${\it rgfseries}\, := \,{\it series} \left( 3\,{x}^{18}+{x}^{12}+10\,{x}^{48}+4\,{x}^{24}+7\,{x}^{36}+6\,{x}^{30}+9\,{x}^{42}+12\,{x}^{54}+{x}^{8}\\
\mbox{}+2\,{x}^{10}+21\,{x}^{88}+5\,{x}^{22}+4\,{x}^{20}+3\,{x}^{16}+3\,{x}^{14}+6\,{x}^{28}+6\,{x}^{26}+8\,{x}^{34}+7\,{x}^{32}+9\,{x}^{38}+11\,{x}^{46}\\
\mbox{}+9\,{x}^{40}+10\,{x}^{44}+12\,{x}^{50}+12\,{x}^{52}+13\,{x}^{56}+14\,{x}^{58}+O \left( {x}^{102} \right) +23\,{x}^{94}+24\,{x}^{98}+24\,{x}^{100}\\
\mbox{}+22\,{x}^{96}+19\,{x}^{84}+21\,{x}^{90}+22\,{x}^{92}+21\,{x}^{86}+18\,{x}^{76}+19\,{x}^{80}+20\,{x}^{82}+18\,{x}^{78}+16\,{x}^{68}\\
\mbox{}+16\,{x}^{72}+18\,{x}^{74}+17\,{x}^{70}+13\,{x}^{60}+15\,{x}^{64}+15\,{x}^{66}+15\,{x}^{62},x,102 \right) $}

\end{maplelatex}
The dimension and period for affine magic, and the standard denominator:\begin{mapleinput}
\mapleinline{active}{1d}{da:=2;
pa:=18;
adenom:=(1-x\symbol{94}pa)\symbol{94}(da+1);}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{da := 2}{%
\[
{\it da}\, := \,2
\]
}

\end{maplelatex}

\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{pa := 18}{%
\[
{\it pa}\, := \,18
\]
}
\mapleinline{inert}{2d}{adenom := (1-x^18)^3}{%
\[
{\it adenom}\, := \, \left( 1-{x}^{18} \right) ^{3}
\]
}

\end{maplelatex}
See Section 2.2 of "Six Little Squares". We get LattE to spit out two generating functions--one for the polytope P_a:\begin{mapleinput}
\mapleinline{active}{1d}{magicaffp:=(1-t)/(1-t\symbol{94}3) * ((1) / ((((1) + (-1)*t\symbol{94}1) * (((1) + (-1)*t\symbol{94}3) * ((1) + (-1)*t\symbol{94}6)))\symbol{94}1));}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{magicaffp := 1/((1-t^3)^2*(1-t^6))}{%
\[
{\it magicaffp}\, := \,{\frac {1}{ \left( 1-{t}^{3} \right) ^{2} \left( 1-{t}^{6} \right) }}
\]
}

\end{maplelatex}
... and one for P_a intersect h:\begin{mapleinput}
\mapleinline{active}{1d}{magicaffh:=(1-t)/(1-t\symbol{94}3) * ((1) / ((((1) + (-1)*t\symbol{94}1) * ((1) + (-1)*t\symbol{94}9))\symbol{94}1));}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{magicaffh := 1/((1-t^3)*(1-t^9))}{%
\[
{\it magicaffh}\, := \,{\frac {1}{ \left( 1-{t}^{3} \right)  \left( 1-{t}^{9} \right) }}
\]
}

\end{maplelatex}
From this point on we proceed as above...\begin{mapleinput}
\mapleinline{active}{1d}{openmagicaffp:=simplify(-subs(t=1/x,magicaffp));}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{openmagicaffp := -x^12/((x^3-1)^2*(x^6-1))}{%
\[
{\it openmagicaffp}\, := \,-{\frac {{x}^{12}}{ \left( {x}^{3}-1 \right) ^{2} \left( {x}^{6}-1 \right) }}
\]
}

\end{maplelatex}
\begin{mapleinput}
\mapleinline{active}{1d}{openmagicaffh:=simplify(subs(t=1/x,magicaffh));}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{openmagicaffh := x^12/((x^3-1)*(x^9-1))}{%
\[
{\it openmagicaffh}\, := \,{\frac {{x}^{12}}{ \left( {x}^{3}-1 \right)  \left( {x}^{9}-1 \right) }}
\]
}

\end{maplelatex}
\begin{mapleinput}
\mapleinline{active}{1d}{magfsum:=openmagicaffp-openmagicaffh;
Magfsum:=8*magfsum;}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{magfsum := -x^12/((x^3-1)^2*(x^6-1))-x^12/((x^3-1)*(x^9-1))}{%
\[
{\it magfsum}\, := \,-{\frac {{x}^{12}}{ \left( {x}^{3}-1 \right) ^{2} \left( {x}^{6}-1 \right) }}-{\frac {{x}^{12}}{ \left( {x}^{3}-1 \right)  \left( {x}^{9}-1 \right) }}
\]
}
\mapleinline{inert}{2d}{Magfsum := -8*x^12/((x^3-1)^2*(x^6-1))-8*x^12/((x^3-1)*(x^9-1))}{%
\[
{\it Magfsum}\, := \,-8\,{\frac {{x}^{12}}{ \left( {x}^{3}-1 \right) ^{2} \left( {x}^{6}-1 \right) }}-8\,{\frac {{x}^{12}}{ \left( {x}^{3}-1 \right)  \left( {x}^{9}-1 \right) }}
\]
}

\end{maplelatex}
\begin{mapleinput}
\mapleinline{active}{1d}{Magfs:=simplify(Magfsum);
magfs:=simplify(magfsum);}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Magfs := -8*(2*x^3+1)*x^15/((x^9-1)*(x^3-1)*(x^6-1))}{%
\[
{\it Magfs}\, := \,-8\,{\frac { \left( 2\,{x}^{3}+1 \right) {x}^{15}}{ \left( {x}^{9}-1 \right)  \left( {x}^{3}-1 \right)  \left( {x}^{6}-1 \right) }}
\]
}
\mapleinline{inert}{2d}{magfs := -(2*x^3+1)*x^15/((x^9-1)*(x^3-1)*(x^6-1))}{%
\[
{\it magfs}\, := \,-{\frac { \left( 2\,{x}^{3}+1 \right) {x}^{15}}{ \left( {x}^{9}-1 \right)  \left( {x}^{3}-1 \right)  \left( {x}^{6}-1 \right) }}
\]
}

\end{maplelatex}
Now we bring the total generating function into "normalized form" with denominator "cdenom"...\begin{mapleinput}
\mapleinline{active}{1d}{num:=numer(Magfs):
den:=denom(Magfs):}{}
\end{mapleinput}\begin{mapleinput}
\mapleinline{active}{1d}{Magicnumaff:=expand(simplify(adenom/den)*num):
Magf:=Magicnumaff/adenom;}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Magf := (8*x^15+112*x^33+80*x^27+24*x^18+32*x^21+56*x^24+104*x^30+112*x^39+104*x^36+24*x^51+64*x^45+40*x^48+88*x^42+16*x^54)/(1-x^18)^3}{%
${\it Magf}\, := \,{\frac {8\,{x}^{15}+112\,{x}^{33}+80\,{x}^{27}+24\,{x}^{18}+32\,{x}^{21}+56\,{x}^{24}+104\,{x}^{30}+112\,{x}^{39}+104\,{x}^{36}+24\,{x}^{51}\\
\mbox{}+64\,{x}^{45}+40\,{x}^{48}+88\,{x}^{42}+16\,{x}^{54}}{ \left( 1-{x}^{18} \right) ^{3}}}$}

\end{maplelatex}
And the symmetry-type generating function ...\begin{mapleinput}
\mapleinline{active}{1d}{num:=numer(magfs):
den:=denom(magfs):}{}
\end{mapleinput}\begin{mapleinput}
\mapleinline{active}{1d}{magicnumaff:=(expand(simplify(adenom/den)*num)):
magf:=magicnumaff/adenom;}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{magf := (x^15+14*x^33+10*x^27+3*x^18+4*x^21+7*x^24+13*x^30+14*x^39+13*x^36+3*x^51+8*x^45+5*x^48+11*x^42+2*x^54)/(1-x^18)^3}{%
${\it magf}\, := \,{\frac {{x}^{15}+14\,{x}^{33}+10\,{x}^{27}+3\,{x}^{18}+4\,{x}^{21}+7\,{x}^{24}+13\,{x}^{30}+14\,{x}^{39}+13\,{x}^{36}+3\,{x}^{51}+8\,{x}^{45}+5\,{x}^{48}\\
\mbox{}+11\,{x}^{42}+2\,{x}^{54}}{ \left( 1-{x}^{18} \right) ^{3}}}$}

\end{maplelatex}
Now we expand the series to find the first few values of the counts.\begin{mapleinput}
\mapleinline{active}{1d}{Magfseries:=series(Magf,x=0,enddegree+1);}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Magfseries := series(8*x^15+24*x^18+32*x^21+56*x^24+80*x^27+104*x^30+136*x^33+176*x^36+208*x^39+256*x^42+304*x^45+352*x^48+408*x^51+472*x^54+528*x^57+600*x^60+672*x^63+744*x^66+824*x^69+912*x^72+992*x^75+1088*x^78+1184*x^81+1280*x^84+1384*x^87+1496*x^90+1600*x^93+1720*x^96+1840*x^99+O(x^102),x,102)}{%
${\it Magfseries}\, := \,{\it series} \left( 24\,{x}^{18}+8\,{x}^{15}+408\,{x}^{51}+304\,{x}^{45}+352\,{x}^{48}+56\,{x}^{24}+32\,{x}^{21}\\
\mbox{}+176\,{x}^{36}+104\,{x}^{30}+136\,{x}^{33}+80\,{x}^{27}+208\,{x}^{39}+256\,{x}^{42}+472\,{x}^{54}+528\,{x}^{57}+600\,{x}^{60}\\
\mbox{}+672\,{x}^{63}+744\,{x}^{66}+824\,{x}^{69}+912\,{x}^{72}+992\,{x}^{75}+1088\,{x}^{78}+1184\,{x}^{81}+1280\,{x}^{84}\\
\mbox{}+1384\,{x}^{87}+1496\,{x}^{90}+1600\,{x}^{93}+1720\,{x}^{96}+1840\,{x}^{99}+O \left( {x}^{102} \right) ,x,102 \right) $}

\end{maplelatex}
\begin{mapleinput}
\mapleinline{active}{1d}{magfseries:=series(magf,x=0,enddegree+1);}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{magfseries := series(x^15+3*x^18+4*x^21+7*x^24+10*x^27+13*x^30+17*x^33+22*x^36+26*x^39+32*x^42+38*x^45+44*x^48+51*x^51+59*x^54+66*x^57+75*x^60+84*x^63+93*x^66+103*x^69+114*x^72+124*x^75+136*x^78+148*x^81+160*x^84+173*x^87+187*x^90+200*x^93+215*x^96+230*x^99+O(x^102),x,102)}{%
${\it magfseries}\, := \,{\it series} \left( 3\,{x}^{18}+{x}^{15}+51\,{x}^{51}+38\,{x}^{45}+44\,{x}^{48}+7\,{x}^{24}+4\,{x}^{21}+22\,{x}^{36}\\
\mbox{}+13\,{x}^{30}+17\,{x}^{33}+10\,{x}^{27}+26\,{x}^{39}+32\,{x}^{42}+59\,{x}^{54}+66\,{x}^{57}+75\,{x}^{60}+84\,{x}^{63}+93\,{x}^{66}\\
\mbox{}+103\,{x}^{69}+114\,{x}^{72}+124\,{x}^{75}+136\,{x}^{78}+148\,{x}^{81}+160\,{x}^{84}+173\,{x}^{87}+187\,{x}^{90}+200\,{x}^{93}\\
\mbox{}+215\,{x}^{96}+230\,{x}^{99}+O \left( {x}^{102} \right) ,x,102 \right) $}

\end{maplelatex}
The generating functions of R_mc(n) and r_mc(n).  The conversion factor is:\begin{mapleinput}
\mapleinline{active}{1d}{ramultiplier:=x\symbol{94}3/(1-x\symbol{94}3);}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{ramultiplier := x^3/(1-x^3)}{%
\[
{\it ramultiplier}\, := \,{\frac {{x}^{3}}{1-{x}^{3}}}
\]
}

\end{maplelatex}
\begin{mapleinput}
\mapleinline{active}{1d}{Ragfs:=simplify(Magfs/ramultiplier); 
ragfs:=simplify(magfs/ramultiplier); }{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Ragfs := 8*x^12*(2*x^3+1)/((x^6-1)*(x^3-1)*(x^6+x^3+1))}{%
\[
{\it Ragfs}\, := \,8\,{\frac {{x}^{12} \left( 2\,{x}^{3}+1 \right) }{ \left( {x}^{6}-1 \right)  \left( {x}^{3}-1 \right)  \left( {x}^{6}+{x}^{3}+1 \right) }}
\]
}
\mapleinline{inert}{2d}{ragfs := x^12*(2*x^3+1)/((x^6-1)*(x^3-1)*(x^6+x^3+1))}{%
\[
{\it ragfs}\, := \,{\frac {{x}^{12} \left( 2\,{x}^{3}+1 \right) }{ \left( {x}^{6}-1 \right)  \left( {x}^{3}-1 \right)  \left( {x}^{6}+{x}^{3}+1 \right) }}
\]
}

\end{maplelatex}
Now standardize the denominator for reduced g.f.  dra = the degree for reduced squares.\begin{mapleinput}
\mapleinline{active}{1d}{dra:=1;
radenom:=(1-x\symbol{94}pa)\symbol{94}(dra+1);}{}
\end{mapleinput}\begin{mapleinput}
\mapleinline{active}{1d}{num:=numer(Ragfs):
den:=denom(Ragfs):}{}
\end{mapleinput}\begin{mapleinput}
\mapleinline{active}{1d}{Ramagicnum:=simplify(radenom/den)*num:
Ragf:=Ramagicnum/radenom;}{}
\end{mapleinput}\begin{mapleinput}
\mapleinline{active}{1d}{num:=numer(ragfs):
den:=denom(ragfs):}{}
\end{mapleinput}\begin{mapleinput}
\mapleinline{active}{1d}{ramagicnum:=simplify(radenom/den)*num:
ragf:=ramagicnum/radenom;}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{dra := 1}{%
\[
{\it dra}\, := \,1
\]
}
\mapleinline{inert}{2d}{radenom := (1-x^18)^2}{%
\[
{\it radenom}\, := \, \left( 1-{x}^{18} \right) ^{2}
\]
}
\mapleinline{inert}{2d}{Ragf := 8*(x^12+x^6+1)*(x^9+1)*x^12*(2*x^3+1)/(1-x^18)^2}{%
\[
{\it Ragf}\, := \,8\,{\frac { \left( {x}^{12}+{x}^{6}+1 \right)  \left( {x}^{9}+1 \right) {x}^{12} \left( 2\,{x}^{3}+1 \right) }{ \left( 1-{x}^{18} \right) ^{2}}}
\]
}
\mapleinline{inert}{2d}{ragf := (x^12+x^6+1)*(x^9+1)*x^12*(2*x^3+1)/(1-x^18)^2}{%
\[
{\it ragf}\, := \,{\frac { \left( {x}^{12}+{x}^{6}+1 \right)  \left( {x}^{9}+1 \right) {x}^{12} \left( 2\,{x}^{3}+1 \right) }{ \left( 1-{x}^{18} \right) ^{2}}}
\]
}

\end{maplelatex}
Let's check the first few terms of the reduced series...\begin{mapleinput}
\mapleinline{active}{1d}{Ragfseries:=series(Ragf,x=0,enddegree+1);}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Ragfseries := series(8*x^12+16*x^15+8*x^18+24*x^21+24*x^24+24*x^27+32*x^30+40*x^33+32*x^36+48*x^39+48*x^42+48*x^45+56*x^48+64*x^51+56*x^54+72*x^57+72*x^60+72*x^63+80*x^66+88*x^69+80*x^72+96*x^75+96*x^78+96*x^81+104*x^84+112*x^87+104*x^90+120*x^93+120*x^96+120*x^99+O(x^102),x,102)}{%
${\it Ragfseries}\, := \,{\it series} \left( 8\,{x}^{18}+8\,{x}^{12}+16\,{x}^{15}+64\,{x}^{51}+48\,{x}^{45}+56\,{x}^{48}+24\,{x}^{24}+24\,{x}^{21}\\
\mbox{}+32\,{x}^{36}+32\,{x}^{30}+40\,{x}^{33}+24\,{x}^{27}+48\,{x}^{39}+48\,{x}^{42}+56\,{x}^{54}+72\,{x}^{57}+72\,{x}^{60}+72\,{x}^{63}\\
\mbox{}+80\,{x}^{66}+88\,{x}^{69}+80\,{x}^{72}+96\,{x}^{75}+96\,{x}^{78}+96\,{x}^{81}+104\,{x}^{84}+112\,{x}^{87}+104\,{x}^{90}+120\,{x}^{93}\\
\mbox{}+120\,{x}^{96}+120\,{x}^{99}+O \left( {x}^{102} \right) ,x,102 \right) $}

\end{maplelatex}
\begin{mapleinput}
\mapleinline{active}{1d}{ragfseries:=series(ragf,x=0,enddegree+1);}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{ragfseries := series(x^12+2*x^15+x^18+3*x^21+3*x^24+3*x^27+4*x^30+5*x^33+4*x^36+6*x^39+6*x^42+6*x^45+7*x^48+8*x^51+7*x^54+9*x^57+9*x^60+9*x^63+10*x^66+11*x^69+10*x^72+12*x^75+12*x^78+12*x^81+13*x^84+14*x^87+13*x^90+15*x^93+15*x^96+15*x^99+O(x^102),x,102)}{%
${\it ragfseries}\, := \,{\it series} \left( {x}^{18}+{x}^{12}+2\,{x}^{15}+8\,{x}^{51}+6\,{x}^{45}+7\,{x}^{48}+3\,{x}^{24}+3\,{x}^{21}+4\,{x}^{36}+4\,{x}^{30}\\
\mbox{}+5\,{x}^{33}+3\,{x}^{27}+6\,{x}^{39}+6\,{x}^{42}+7\,{x}^{54}+9\,{x}^{57}+9\,{x}^{60}+9\,{x}^{63}+10\,{x}^{66}+11\,{x}^{69}+10\,{x}^{72}+12\,{x}^{75}\\
\mbox{}+12\,{x}^{78}+12\,{x}^{81}+13\,{x}^{84}+14\,{x}^{87}+13\,{x}^{90}+15\,{x}^{93}+15\,{x}^{96}+15\,{x}^{99}+O \left( {x}^{102} \right) ,x,102\\
\mbox{} \right) $}

\end{maplelatex}
The constituents of the affine total counting function.  First, the 0th constituent, then times 9/2 to clear the denominators and a trivial constant factor.\begin{mapleinput}
\mapleinline{active}{1d}{Maconstituent[0]:=expand(sum(coeff(Magicnumaff,x,pa*j)*binomial(da+t/pa-j,da),j=1..da+1));
9/2*Maconstituent[0];
factor(%);}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Maconstituent[0] := -32/9*t+2/9*t^2+16}{%
\[
{\it Maconstituent}_{{0}}\, := \,-{\frac {32}{9}}\,t+2/9\,{t}^{2}+16
\]
}
\mapleinline{inert}{2d}{-16*t+t^2+72}{%
\[
-16\,t+{t}^{2}+72
\]
}
\mapleinline{inert}{2d}{-16*t+t^2+72}{%
\[
-16\,t+{t}^{2}+72
\]
}

\end{maplelatex}
\begin{mapleinput}
\mapleinline{active}{1d}{for r from 1 to pa do
  Maconstituent[r]:=expand(sum(coeff(Magicnumaff,x,pa*j+r)*binomial(da+(t-r)/pa-j,da),j=0..d));
  9/2*%;
  factor(%);
od;}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Maconstituent[1] := 0}{%
\[
{\it Maconstituent}_{{1}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{Maconstituent[2] := 0}{%
\[
{\it Maconstituent}_{{2}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{Maconstituent[3] := -32/9*t+2/9*t^2+26/3}{%
\[
{\it Maconstituent}_{{3}}\, := \,-{\frac {32}{9}}\,t+2/9\,{t}^{2}+{\frac {26}{3}}
\]
}
\mapleinline{inert}{2d}{-16*t+t^2+39}{%
\[
-16\,t+{t}^{2}+39
\]
}
\mapleinline{inert}{2d}{(t-3)*(t-13)}{%
\[
 \left( t-3 \right)  \left( t-13 \right) 
\]
}
\mapleinline{inert}{2d}{Maconstituent[4] := 0}{%
\[
{\it Maconstituent}_{{4}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{Maconstituent[5] := 0}{%
\[
{\it Maconstituent}_{{5}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{Maconstituent[6] := -32/9*t+2/9*t^2+40/3}{%
\[
{\it Maconstituent}_{{6}}\, := \,-{\frac {32}{9}}\,t+2/9\,{t}^{2}+{\frac {40}{3}}
\]
}
\mapleinline{inert}{2d}{-16*t+t^2+60}{%
\[
-16\,t+{t}^{2}+60
\]
}
\mapleinline{inert}{2d}{(t-6)*(t-10)}{%
\[
 \left( t-6 \right)  \left( t-10 \right) 
\]
}
\mapleinline{inert}{2d}{Maconstituent[7] := 0}{%
\[
{\it Maconstituent}_{{7}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{Maconstituent[8] := 0}{%
\[
{\it Maconstituent}_{{8}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{Maconstituent[9] := 2/9*t^2+14-32/9*t}{%
\[
{\it Maconstituent}_{{9}}\, := \,2/9\,{t}^{2}+14-{\frac {32}{9}}\,t
\]
}
\mapleinline{inert}{2d}{t^2+63-16*t}{%
\[
{t}^{2}+63-16\,t
\]
}
\mapleinline{inert}{2d}{(t-7)*(t-9)}{%
\[
 \left( t-7 \right)  \left( t-9 \right) 
\]
}
\mapleinline{inert}{2d}{Maconstituent[10] := 0}{%
\[
{\it Maconstituent}_{{10}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{Maconstituent[11] := 0}{%
\[
{\it Maconstituent}_{{11}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{Maconstituent[12] := -32/9*t+2/9*t^2+32/3}{%
\[
{\it Maconstituent}_{{12}}\, := \,-{\frac {32}{9}}\,t+2/9\,{t}^{2}+{\frac {32}{3}}
\]
}
\mapleinline{inert}{2d}{-16*t+t^2+48}{%
\[
-16\,t+{t}^{2}+48
\]
}
\mapleinline{inert}{2d}{(t-4)*(t-12)}{%
\[
 \left( t-4 \right)  \left( t-12 \right) 
\]
}
\mapleinline{inert}{2d}{Maconstituent[13] := 0}{%
\[
{\it Maconstituent}_{{13}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{Maconstituent[14] := 0}{%
\[
{\it Maconstituent}_{{14}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{Maconstituent[15] := 34/3-32/9*t+2/9*t^2}{%
\[
{\it Maconstituent}_{{15}}\, := \,{\frac {34}{3}}-{\frac {32}{9}}\,t+2/9\,{t}^{2}
\]
}
\mapleinline{inert}{2d}{51-16*t+t^2}{%
\[
51-16\,t+{t}^{2}
\]
}
\mapleinline{inert}{2d}{51-16*t+t^2}{%
\[
51-16\,t+{t}^{2}
\]
}
\mapleinline{inert}{2d}{Maconstituent[16] := 0}{%
\[
{\it Maconstituent}_{{16}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{Maconstituent[17] := 0}{%
\[
{\it Maconstituent}_{{17}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{Maconstituent[18] := -32/9*t+2/9*t^2+16}{%
\[
{\it Maconstituent}_{{18}}\, := \,-{\frac {32}{9}}\,t+2/9\,{t}^{2}+16
\]
}
\mapleinline{inert}{2d}{-16*t+t^2+72}{%
\[
-16\,t+{t}^{2}+72
\]
}
\mapleinline{inert}{2d}{-16*t+t^2+72}{%
\[
-16\,t+{t}^{2}+72
\]
}

\end{maplelatex}
The constituents of the affine symmetry-class counting function.  First, the 0th constituent.\begin{mapleinput}
\mapleinline{active}{1d}{maconstituent[0]:=expand(sum(coeff(magicnumaff,x,pa*j)*binomial(da+t/pa-j,da),j=1..da+1));}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{maconstituent[0] := -4/9*t+1/36*t^2+2}{%
\[
{\it maconstituent}_{{0}}\, := \,-4/9\,t+1/36\,{t}^{2}+2
\]
}

\end{maplelatex}
\begin{mapleinput}
\mapleinline{active}{1d}{for r from 1 to pa do
  maconstituent[r]:=expand(sum(coeff(magicnumaff,x,pa*j+r)*binomial(da+(t-r)/pa-j,da),j=0..d));
od;}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{maconstituent[1] := 0}{%
\[
{\it maconstituent}_{{1}}\, := \,0
\]
}
\mapleinline{inert}{2d}{maconstituent[2] := 0}{%
\[
{\it maconstituent}_{{2}}\, := \,0
\]
}
\mapleinline{inert}{2d}{maconstituent[3] := -4/9*t+1/36*t^2+13/12}{%
\[
{\it maconstituent}_{{3}}\, := \,-4/9\,t+1/36\,{t}^{2}+{\frac {13}{12}}
\]
}
\mapleinline{inert}{2d}{maconstituent[4] := 0}{%
\[
{\it maconstituent}_{{4}}\, := \,0
\]
}
\mapleinline{inert}{2d}{maconstituent[5] := 0}{%
\[
{\it maconstituent}_{{5}}\, := \,0
\]
}
\mapleinline{inert}{2d}{maconstituent[6] := -4/9*t+1/36*t^2+5/3}{%
\[
{\it maconstituent}_{{6}}\, := \,-4/9\,t+1/36\,{t}^{2}+5/3
\]
}
\mapleinline{inert}{2d}{maconstituent[7] := 0}{%
\[
{\it maconstituent}_{{7}}\, := \,0
\]
}
\mapleinline{inert}{2d}{maconstituent[8] := 0}{%
\[
{\it maconstituent}_{{8}}\, := \,0
\]
}
\mapleinline{inert}{2d}{maconstituent[9] := 1/36*t^2+7/4-4/9*t}{%
\[
{\it maconstituent}_{{9}}\, := \,1/36\,{t}^{2}+7/4-4/9\,t
\]
}
\mapleinline{inert}{2d}{maconstituent[10] := 0}{%
\[
{\it maconstituent}_{{10}}\, := \,0
\]
}
\mapleinline{inert}{2d}{maconstituent[11] := 0}{%
\[
{\it maconstituent}_{{11}}\, := \,0
\]
}
\mapleinline{inert}{2d}{maconstituent[12] := -4/9*t+1/36*t^2+4/3}{%
\[
{\it maconstituent}_{{12}}\, := \,-4/9\,t+1/36\,{t}^{2}+4/3
\]
}
\mapleinline{inert}{2d}{maconstituent[13] := 0}{%
\[
{\it maconstituent}_{{13}}\, := \,0
\]
}
\mapleinline{inert}{2d}{maconstituent[14] := 0}{%
\[
{\it maconstituent}_{{14}}\, := \,0
\]
}
\mapleinline{inert}{2d}{maconstituent[15] := 17/12-4/9*t+1/36*t^2}{%
\[
{\it maconstituent}_{{15}}\, := \,{\frac {17}{12}}-4/9\,t+1/36\,{t}^{2}
\]
}
\mapleinline{inert}{2d}{maconstituent[16] := 0}{%
\[
{\it maconstituent}_{{16}}\, := \,0
\]
}
\mapleinline{inert}{2d}{maconstituent[17] := 0}{%
\[
{\it maconstituent}_{{17}}\, := \,0
\]
}
\mapleinline{inert}{2d}{maconstituent[18] := -4/9*t+1/36*t^2+2}{%
\[
{\it maconstituent}_{{18}}\, := \,-4/9\,t+1/36\,{t}^{2}+2
\]
}

\end{maplelatex}
Test affine total-count constituents up to "enddegree".  Print any n that give wrong evaluation.\begin{mapleinput}
\mapleinline{active}{1d}{print("Test affine constituents; print any inconsistent evaluations.");
for n from 1 to enddegree do
  r:=modp(n,pa);
  value:=eval(Maconstituent[r],t=n);
  term:=coeff(Magfseries,x,n);
  if ( value-term <\TEXTsymbol{>} 0 ) then print(n,r,value,term,value-term); fi;
od:
print("Values checked from 1 to", enddegree);}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{"Test affine constituents; print any inconsistent evaluations."}{%
$\mbox {{\tt ``Test affine constituents; print any inconsistent evaluations.''}}$}
\mapleinline{inert}{2d}{"Values checked from 1 to", 100}{%
$\mbox {{\tt ``Values checked from 1 to''}},\,100$}

\end{maplelatex}
The constituents of the affine reduced counting function.  First, the 0th constituent, then times 3/4 to clear the denominators and a trivial constant factor.\begin{mapleinput}
\mapleinline{active}{1d}{Raconstituent[0]:=expand(sum(coeff(Ramagicnum,x,pa*j)*binomial(dra+t/pa-j,dra),j=1..dra+1));
3/4*Raconstituent[0];}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Raconstituent[0] := 4/3*t-16}{%
\[
{\it Raconstituent}_{{0}}\, := \,4/3\,t-16
\]
}
\mapleinline{inert}{2d}{t-12}{%
\[
t-12
\]
}

\end{maplelatex}
\begin{mapleinput}
\mapleinline{active}{1d}{for r from 1 to pa do
  Raconstituent[r]:=expand(sum(coeff(Ramagicnum,x,pa*j+r)*binomial(dra+(t-r)/pa-j,dra),j=0..dra));
  3/4*%;
od;}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{Raconstituent[1] := 0}{%
\[
{\it Raconstituent}_{{1}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{Raconstituent[2] := 0}{%
\[
{\it Raconstituent}_{{2}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{Raconstituent[3] := 4/3*t-4}{%
\[
{\it Raconstituent}_{{3}}\, := \,4/3\,t-4
\]
}
\mapleinline{inert}{2d}{t-3}{%
\[
t-3
\]
}
\mapleinline{inert}{2d}{Raconstituent[4] := 0}{%
\[
{\it Raconstituent}_{{4}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{Raconstituent[5] := 0}{%
\[
{\it Raconstituent}_{{5}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{Raconstituent[6] := 4/3*t-8}{%
\[
{\it Raconstituent}_{{6}}\, := \,4/3\,t-8
\]
}
\mapleinline{inert}{2d}{t-6}{%
\[
t-6
\]
}
\mapleinline{inert}{2d}{Raconstituent[7] := 0}{%
\[
{\it Raconstituent}_{{7}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{Raconstituent[8] := 0}{%
\[
{\it Raconstituent}_{{8}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{Raconstituent[9] := 4/3*t-12}{%
\[
{\it Raconstituent}_{{9}}\, := \,4/3\,t-12
\]
}
\mapleinline{inert}{2d}{t-9}{%
\[
t-9
\]
}
\mapleinline{inert}{2d}{Raconstituent[10] := 0}{%
\[
{\it Raconstituent}_{{10}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{Raconstituent[11] := 0}{%
\[
{\it Raconstituent}_{{11}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{Raconstituent[12] := 4/3*t-8}{%
\[
{\it Raconstituent}_{{12}}\, := \,4/3\,t-8
\]
}
\mapleinline{inert}{2d}{t-6}{%
\[
t-6
\]
}
\mapleinline{inert}{2d}{Raconstituent[13] := 0}{%
\[
{\it Raconstituent}_{{13}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{Raconstituent[14] := 0}{%
\[
{\it Raconstituent}_{{14}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{Raconstituent[15] := 4/3*t-4}{%
\[
{\it Raconstituent}_{{15}}\, := \,4/3\,t-4
\]
}
\mapleinline{inert}{2d}{t-3}{%
\[
t-3
\]
}
\mapleinline{inert}{2d}{Raconstituent[16] := 0}{%
\[
{\it Raconstituent}_{{16}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{Raconstituent[17] := 0}{%
\[
{\it Raconstituent}_{{17}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{Raconstituent[18] := 4/3*t-16}{%
\[
{\it Raconstituent}_{{18}}\, := \,4/3\,t-16
\]
}
\mapleinline{inert}{2d}{t-12}{%
\[
t-12
\]
}

\end{maplelatex}
The constituents of the affine reduced symmetry-class counting function.  First, the 0th constituent.\begin{mapleinput}
\mapleinline{active}{1d}{raconstituent[0]:=expand(sum(coeff(ramagicnum,x,pa*j)*binomial(dra+t/pa-j,dra),j=1..dra+1));}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{raconstituent[0] := 1/6*t-2}{%
\[
{\it raconstituent}_{{0}}\, := \,1/6\,t-2
\]
}

\end{maplelatex}
\begin{mapleinput}
\mapleinline{active}{1d}{for r from 1 to pa do
  raconstituent[r]:=expand(sum(coeff(ramagicnum,x,pa*j+r)*binomial(dra+(t-r)/pa-j,dra),j=0..dra));
  6*%;
od;}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{raconstituent[1] := 0}{%
\[
{\it raconstituent}_{{1}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{raconstituent[2] := 0}{%
\[
{\it raconstituent}_{{2}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{raconstituent[3] := 1/6*t-1/2}{%
\[
{\it raconstituent}_{{3}}\, := \,1/6\,t-1/2
\]
}
\mapleinline{inert}{2d}{t-3}{%
\[
t-3
\]
}
\mapleinline{inert}{2d}{raconstituent[4] := 0}{%
\[
{\it raconstituent}_{{4}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{raconstituent[5] := 0}{%
\[
{\it raconstituent}_{{5}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{raconstituent[6] := 1/6*t-1}{%
\[
{\it raconstituent}_{{6}}\, := \,1/6\,t-1
\]
}
\mapleinline{inert}{2d}{t-6}{%
\[
t-6
\]
}
\mapleinline{inert}{2d}{raconstituent[7] := 0}{%
\[
{\it raconstituent}_{{7}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{raconstituent[8] := 0}{%
\[
{\it raconstituent}_{{8}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{raconstituent[9] := 1/6*t-3/2}{%
\[
{\it raconstituent}_{{9}}\, := \,1/6\,t-3/2
\]
}
\mapleinline{inert}{2d}{t-9}{%
\[
t-9
\]
}
\mapleinline{inert}{2d}{raconstituent[10] := 0}{%
\[
{\it raconstituent}_{{10}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{raconstituent[11] := 0}{%
\[
{\it raconstituent}_{{11}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{raconstituent[12] := 1/6*t-1}{%
\[
{\it raconstituent}_{{12}}\, := \,1/6\,t-1
\]
}
\mapleinline{inert}{2d}{t-6}{%
\[
t-6
\]
}
\mapleinline{inert}{2d}{raconstituent[13] := 0}{%
\[
{\it raconstituent}_{{13}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{raconstituent[14] := 0}{%
\[
{\it raconstituent}_{{14}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{raconstituent[15] := 1/6*t-1/2}{%
\[
{\it raconstituent}_{{15}}\, := \,1/6\,t-1/2
\]
}
\mapleinline{inert}{2d}{t-3}{%
\[
t-3
\]
}
\mapleinline{inert}{2d}{raconstituent[16] := 0}{%
\[
{\it raconstituent}_{{16}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{raconstituent[17] := 0}{%
\[
{\it raconstituent}_{{17}}\, := \,0
\]
}
\mapleinline{inert}{2d}{0}{%
\[
0
\]
}
\mapleinline{inert}{2d}{raconstituent[18] := 1/6*t-2}{%
\[
{\it raconstituent}_{{18}}\, := \,1/6\,t-2
\]
}
\mapleinline{inert}{2d}{t-12}{%
\[
t-12
\]
}

\end{maplelatex}
Test affine reduced constituents up to "enddegree".  Print any n that give wrong evaluation.\begin{mapleinput}
\mapleinline{active}{1d}{print("Test affine reduced constituents; print any inconsistent evaluations.");
for n from 1 to enddegree do
  r:=modp(n,pa);
  value:=eval(Raconstituent[r],t=n);
  term:=coeff(Ragfseries,x,n);
  if ( value-term <\TEXTsymbol{>} 0 ) then print(n,r,value,term,value-term); fi;
od:
print("Values checked from 1 to", enddegree);}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{"Test affine reduced constituents; print any inconsistent evaluations."}{%
$\mbox {{\tt ``Test affine reduced constituents; print any inconsistent evaluations.''}}$}
\mapleinline{inert}{2d}{"Values checked from 1 to", 100}{%
$\mbox {{\tt ``Values checked from 1 to''}},\,100$}

\end{maplelatex}
Test affine reduced symmetry-type constituents up to "enddegree".  Print any n that give wrong evaluation.\begin{mapleinput}
\mapleinline{active}{1d}{print("Test affine reduced symmetry-type constituents; print any inconsistent evaluations.");
for n from 1 to enddegree do
  r:=modp(n,pa);
  value:=eval(raconstituent[r],t=n);
  term:=coeff(ragfseries,x,n);
  if ( value-term <\TEXTsymbol{>} 0 ) then print(n,r,value,term,value-term); fi;
od:
print("Values checked from 1 to", enddegree);}{}
\end{mapleinput}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{"Test affine reduced symmetry-type constituents; print any inconsistent evaluations."}{%
$\mbox {{\tt ``Test affine reduced symmetry-type constituents; print any inconsistent evaluations.''}}$}
\mapleinline{inert}{2d}{"Values checked from 1 to", 100}{%
$\mbox {{\tt ``Values checked from 1 to''}},\,100$}

\end{maplelatex}
\end{document}
%% End of Maple 9.00 Output