The case of triangulations: recursive program derived from ODE 

 

 

> # Returns the generating polynomial of ROOTED triangulations with 2n faces
# with u/z marking vertices/faces
# Naive computation coefficient by coefficient from the non-shifted ODE:
triFaces:= proc(n)
option remember:
if n<1 then return 0:
else
eval(subs(Xi(t)=a*t^(6*n)/12/n+add(triFaces(k)*t^(6*k)/12/k,k=1..n-1),bigODEtriangulations)):
factor(series(%,t=0,6*n+2)):
coeff(%,t,6*n-1):
return factor(solve(%,a)):
fi;
end:
 

> # Example n=3
triFaces(4);
 

`+`(`*`(2, `*`(u, `*`(`+`(`*`(2048, `*`(`^`(u, 5))), `*`(14325, `*`(`^`(u, 4))), `*`(56023, `*`(`^`(u, 3))), `*`(124708, `*`(`^`(u, 2))), `*`(154896, `*`(u)), 81920))))) (3.6.1)
 

> # Uses the previous one to compute triangulations with 2n faces and genus g
triFacesGenus:= proc(n,g)
option remember:
if n<1 then return 0:
else
return factor(coeff(triFaces(n),u,n+2-2*g));
fi;
end:

 

> # Example n=7, g=2
triFacesGenus(7,2);
 

22147258392 (3.6.2)