# Complete quadrics: Schubert calculus for Gaussian models and semidefinite programming

## Sections 2,3,4: Polynomiality of ML-degree

psi(I) computes the Lascoux coefficient (Def 2.5, or [LLT, A.15]), where $$I$$ is a strictly increasing sequence of nonnegative integers. The computation is done recursively, based on [LLT, A.15.3 and A.15.5].

[1]:
coefDict = {():1}
def psi(I):
n=len(I)
if tuple(I) in coefDict.keys():
return coefDict.get(tuple(I))
else:
if n%2==0:
if n==2:
ans=sum([binomial(I[0]+I[1],i) for i in [I[0]+1..I[1]]])
else:
ans=sum([(-1)^(k+1)*psi([I[0],I[k]])*psi(I[1:k]+I[k+1:]) for k in [1..n-1]])
else:
if n==1:
ans=2^(I[0])
else:
ans=sum([(-1)^(k)*psi([I[k]])*psi(I[:k]+I[k+1:]) for k in [0..n-1]])
coefDict[tuple(I)]=ans
return ans

Example 2.6:

[2]:
print([psi([0,2]),psi([0,3]),psi([1,2]),psi([1,3]),psi([2,3])])
[3, 7, 3, 10, 10]

psiPoly(I) is the polynomial from Theorem 4.3: $$\psi_{[n] \setminus I}$$, viewed as a polynomial in $$n$$. It is computed recursively, as in the first proof of Theorem 4.3

[3]:
#Some auxiliary functions...
R.<n> = PolynomialRing(QQ)
def summationPolynomial(f,n0):
d=f.degree()
return R.lagrange_polynomial([(i,sum([f(j) for j in [n0..i]])) for i in [n0..n0+d+1]])
def isIncreasing(L):
for i in [0..len(L)-2]:
if L[i]>=L[i+1]:
return false
return true
from itertools import product
s1 = set((0, 1))
polyDict = {():1+R.0-R.0,tuple([0]):R.0} #There really should be a better way to convince sage that 1 is a polynomial in R, not an integer
def psiPoly(I):
r=len(I)
if tuple(I) in polyDict.keys():
return polyDict.get(tuple(I))
else:
if I[0]==0:
ans = (n-r+1)*psiPoly(I[1:])-2*sum([psiPoly(I[1:j]+[I[j]+1]+I[j+1:]) for j in [1..r-2] if I[j+1]>I[j]+1])-2*psiPoly(I[1:r-1]+[I[r-1]+1])
else:
S=set(product(s1, repeat = r))
S.remove(tuple([0 for i in range(r)]))
sumList = [[I[i]-el[i] for i in range(r)] for el in S]
sumList = [el for el in sumList if isIncreasing(el)]
g=sum([psiPoly(el) for el in sumList])
ans=summationPolynomial(g,0)(n-1)
polyDict[tuple(I)]=ans
return ans

deltaPoly(m,s) is the algebraic degree of semidefinite programming $$\delta(m,n,n-s)$$, viewed as a polynomial in $$n$$. It is computed using Theorem 3.7, which expresses $$\delta$$ in terms of the Lascoux coefficients.

[4]:
def deltaPoly(m,s):
L=[list(el) for el in IntegerVectors(m-s, length=s, max_slope=-1)]
for el in L:
el.reverse()
return sum([psi(I)*psiPoly(I) for I in L])

phiPoly(d) is the ML-degree $$\phi(n,d)$$, viewed as a polynomial in $$n$$. It is computed using Corollary 3.6, which expresses $$\phi$$ in terms of $$\delta$$.

[5]:
def phiPoly(d):
ans =0
s=0
while binomial(s+1,2) <= d:
ans=ans+s*deltaPoly(d,s)
s=s+1
return ans/n

We can compute the polynomials $$\phi(d)$$ very quickly. Compare with [SU: section 2.2] and [MMW: Theorem 2.7 and Conjecture 5.1]

[6]:
for d in [1..50]:
print("phi(n,"+str(d)+")="+str(factor(phiPoly(d))))
phi(n,1)=1
phi(n,2)=n - 1
phi(n,3)=(n - 1)^2
phi(n,4)=(5/6) * (n - 2) * (n - 1) * (n - 3/5)
phi(n,5)=(7/12) * (n - 2) * (n - 1) * (n^2 - 19/7*n + 6/7)
phi(n,6)=(43/120) * (n - 2) * (n - 1) * (n^3 - 221/43*n^2 + 316/43*n - 60/43)
phi(n,7)=(1/5) * (n - 3) * (n - 2) * (n - 1) * (n^3 - 19/4*n^2 + 27/4*n - 5/6)
phi(n,8)=(29/280) * (n - 3) * (n - 2) * (n - 1) * (n^4 - 218/29*n^3 + 585/29*n^2 - 1844/87*n + 140/87)
phi(n,9)=(169/3360) * (n - 3) * (n - 2) * (n - 1) * (n^5 - 1770/169*n^4 + 551/13*n^3 - 14042/169*n^2 + 12136/169*n - 560/169)
phi(n,10)=(8357/362880) * (n - 3) * (n - 2) * (n - 1) * (n^6 - 114126/8357*n^5 + 629471/8357*n^4 - 1816902/8357*n^3 + 2911016/8357*n^2 - 2201088/8357*n + 60480/8357)
phi(n,11)=(9053/907200) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^6 - 118395/9053*n^5 + 625700/9053*n^4 - 1749975/9053*n^3 + 2847707/9053*n^2 - 2352810/9053*n + 37800/9053)
phi(n,12)=(40993/9979200) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^7 - 685483/40993*n^6 + 4763290/40993*n^5 - 17995750/40993*n^4 + 41239027/40993*n^3 - 59728927/40993*n^2 + 45442410/40993*n - 415800/40993)
phi(n,13)=(193181/119750400) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^8 - 3971182/193181*n^7 + 34775606/193181*n^6 - 169771120/193181*n^5 + 513095249/193181*n^4 - 1023107578/193181*n^3 + 1363993884/193181*n^2 - 973582920/193181*n + 4989600/193181)
phi(n,14)=(171803/283046400) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^9 - 46396848/1889833*n^8 + 495408186/1889833*n^7 - 3017637516/1889833*n^6 + 1055704647/171803*n^5 - 2718228012/171803*n^4 + 53915220224/1889833*n^3 - 67614012864/1889833*n^2 + 45815422320/1889833*n - 11793600/171803)
phi(n,15)=(1915153/8717829120) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^10 - 274649618/9575765*n^9 + 3483964098/9575765*n^8 - 25717110384/9575765*n^7 + 122421090729/9575765*n^6 - 395852651502/9575765*n^5 + 904189114672/9575765*n^4 - 1513333372336/9575765*n^3 + 1810577141136/9575765*n^2 - 234739292256/1915153*n + 363242880/1915153)
phi(n,16)=(50174947/653837184000) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^10 - 1401922920/50174947*n^9 + 17390792850/50174947*n^8 - 126108891300/50174947*n^7 + 591915383031/50174947*n^6 - 1890057939420/50174947*n^5 + 4275795115700/50174947*n^4 - 7224847889400/50174947*n^3 + 9125430327072/50174947*n^2 - 6498409649760/50174947*n + 5448643200/50174947)
phi(n,17)=(48187/1857492000) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^11 - 34273237/1060114*n^10 + 248809320/530057*n^9 - 2143965825/530057*n^8 + 97495786563/4240456*n^7 - 384269698239/4240456*n^6 + 1081274308475/4240456*n^5 - 2246624126825/4240456*n^4 + 1807014880053/2120228*n^3 - 1103488209297/1060114*n^2 + 377517019005/530057*n - 15479100/48187)
phi(n,18)=(3024902557/355687428096000) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^12 - 111489409997/3024902557*n^11 + 1862235028288/3024902557*n^10 - 18676382506290/3024902557*n^9 + 125446336704681/3024902557*n^8 - 594987544526781/3024902557*n^7 + 2047718727437714/3024902557*n^6 - 5214795516381220/3024902557*n^5 + 10138037306327912/3024902557*n^4 - 15696938913831072/3024902557*n^3 + 18622763914779648/3024902557*n^2 - 12286614789872640/3024902557*n + 2964061900800/3024902557)
phi(n,19)=(1444717441/533531142144000) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^13 - 60001607424/1444717441*n^12 + 1137645743537/1444717441*n^11 - 13067244953292/1444717441*n^10 + 101689400179923/1444717441*n^9 - 567202820662872/1444717441*n^8 + 2335581451841891/1444717441*n^7 - 7211640298093116/1444717441*n^6 + 16948001941811176/1444717441*n^5 - 31254435494183904/1444717441*n^4 + 46935671649114672/1444717441*n^3 - 54259949952931392/1444717441*n^2 + 34619875292136960/1444717441*n - 4446092851200/1444717441)
phi(n,20)=(88540973/105594705216000) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^14 - 394043995081/8499933408*n^13 + 87406012502/88540973*n^12 - 109011370497689/8499933408*n^11 + 80656031209381/708327784*n^10 - 2076599118100361/2833311136*n^9 + 1251616884342919/354163892*n^8 - 110375589520082507/8499933408*n^7 + 25989612119352941/708327784*n^6 - 85792933570715537/1062491676*n^5 + 12635627090993587/88540973*n^4 - 37008418039279473/177081946*n^3 + 20891347202069118/88540973*n^2 - 12922689069012240/88540973*n + 879955876800/88540973)
phi(n,21)=(51253014779/202741834014720000) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^15 - 2631178141515/51253014779*n^14 + 62381708626365/51253014779*n^13 - 907581523608075/51253014779*n^12 + 9084784290597943/51253014779*n^11 - 66483815423885205/51253014779*n^10 + 368587639928649895/51253014779*n^9 - 1579691236454433225/51253014779*n^8 + 5284606567913647602/51253014779*n^7 - 13870315716671860620/51253014779*n^6 + 28907336860316669240/51253014779*n^5 - 49344521697107371200/51253014779*n^4 + 70741532570760058176/51253014779*n^3 - 78132150767586044160/51253014779*n^2 + 46957222493459712000/51253014779*n - 1689515283456000/51253014779)
phi(n,22)=(54221039491/729870602452992000) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^15 - 13680430439907/271105197455*n^14 + 318997101553853/271105197455*n^13 - 4567781499730827/271105197455*n^12 + 45058427583372383/271105197455*n^11 - 325726670392670421/271105197455*n^10 + 1790738949197146039/271105197455*n^9 - 7648498839495504201/271105197455*n^8 + 25615399516168423414/271105197455*n^7 - 67434906919284350292/271105197455*n^6 + 140787343983000207208/271105197455*n^5 - 241217418926982691872/271105197455*n^4 + 353702968338171958848/271105197455*n^3 - 82501679153282547456/54221039491*n^2 + 53483031082920499200/54221039491*n - 1013709170073600/54221039491)
phi(n,23)=(920898077423/43230797222215680000) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^16 - 667099233841061/11971675006499*n^15 + 17257840932238487/11971675006499*n^14 - 275471680875334433/11971675006499*n^13 + 3043713662881881185/11971675006499*n^12 - 24774891957034230935/11971675006499*n^11 + 154405081453086415501/11971675006499*n^10 - 755123811471382023979/11971675006499*n^9 + 2937253372995700308088/11971675006499*n^8 - 9123869151952547569192/11971675006499*n^7 + 22626802429860860197792/11971675006499*n^6 - 45207925816454397012688/11971675006499*n^5 + 75392892348512038360128/11971675006499*n^4 - 108756965666123647350912/11971675006499*n^3 + 124328743760257042245120/11971675006499*n^2 - 78385612947047594496000/11971675006499*n + 60042773919744000/920898077423)
phi(n,24)=(7011625357073/1175091669949317120000) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^17 - 4713330620954108/77127878927803*n^16 + 134313163998095180/77127878927803*n^15 - 2372234663277017504/77127878927803*n^14 + 29131500834759223082/77127878927803*n^13 - 264709308882030453560/77127878927803*n^12 + 168251693956668153396/7011625357073*n^11 - 929287218847479411392/7011625357073*n^10 + 4124112618668088442697/7011625357073*n^9 - 14827006638977581706756/7011625357073*n^8 + 43195787766629542193408/7011625357073*n^7 - 1119513872753107168551424/77127878927803*n^6 + 2154404920465625244305648/77127878927803*n^5 - 3511899855286859045658816/77127878927803*n^4 + 4992531476795664612322176/77127878927803*n^3 - 5599954285923750847234560/77127878927803*n^2 + 312711161684018388480000/7011625357073*n - 1632071763818496000/7011625357073)
phi(n,25)=(63382565342267/38778025108327464960000) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^18 - 71562261196851/1074280768513*n^17 + 131690086494455652/63382565342267*n^16 - 2556624656089312704/63382565342267*n^15 + 34656908243679429582/63382565342267*n^14 - 349049684290430994570/63382565342267*n^13 + 2715855063778733560832/63382565342267*n^12 - 16770218003436545990760/63382565342267*n^11 + 83763144151904258279535/63382565342267*n^10 - 342487819862292042366813/63382565342267*n^9 + 1151255962610150837414100/63382565342267*n^8 - 3173474277060456399414048/63382565342267*n^7 + 7152089047445032952619536/63382565342267*n^6 - 13325424555042957480881808/63382565342267*n^5 + 21302549466308238656990016/63382565342267*n^4 - 29883825174575880192117888/63382565342267*n^3 + 32918059307527455766279680/63382565342267*n^2 - 19731927314754297764352000/63382565342267*n + 53858368206010368000/63382565342267)
phi(n,26)=(1699701283032827/3877802510832746496000000) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^19 - 122762686411978133/1699701283032827*n^18 + 4167125847413234532/1699701283032827*n^17 - 88395834563545428708/1699701283032827*n^16 + 1314620265156297218994/1699701283032827*n^15 - 14583355531464856679886/1699701283032827*n^14 + 125441580569594940397844/1699701283032827*n^13 - 859429851874654646612636/1699701283032827*n^12 + 4783651303131609921704571/1699701283032827*n^11 - 21943663481604069330635829/1699701283032827*n^10 + 83651247208043429190740016/1699701283032827*n^9 - 265324806287942975011889304/1699701283032827*n^8 + 696921969889864293707832368/1699701283032827*n^7 - 1510689010501988076986806352/1699701283032827*n^6 + 2736511806171377128853572608/1699701283032827*n^5 - 4301562006474649233034148352/1699701283032827*n^4 + 5960787645742436323278282240/1699701283032827*n^3 - 6453392047006485691105228800/1699701283032827*n^2 + 3780382377993376961304576000/1699701283032827*n - 5385836820601036800000/1699701283032827)
phi(n,27)=(23225725252875407/201645730563302817792000000) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^20 - 1810255904349998557/23225725252875407*n^19 + 66535669408531725128/23225725252875407*n^18 - 1533853374352484348292/23225725252875407*n^17 + 24885947681152962799770/23225725252875407*n^16 - 302329626654175875420414/23225725252875407*n^15 + 2858300540924929312361276/23225725252875407*n^14 - 21594915491246498409450364/23225725252875407*n^13 + 132979296076237920921821183/23225725252875407*n^12 - 677701929108783022372795581/23225725252875407*n^11 + 2890036547730666957803531364/23225725252875407*n^10 - 10369556839114621433694468696/23225725252875407*n^9 + 31264184892333603372982782896/23225725252875407*n^8 - 78702298468667435937477553168/23225725252875407*n^7 + 164827920767489611244743917632/23225725252875407*n^6 - 291290920512778661120311611648/23225725252875407*n^5 + 451183837425536452919499039744/23225725252875407*n^4 - 618102579576764204429919713280/23225725252875407*n^3 + 658197676519001334653595033600/23225725252875407*n^2 - 377298719047366626049892352000/23225725252875407*n + 280063514671253913600000/23225725252875407)
phi(n,28)=(161622044185347541/5444434725209176080384000000) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^21 - 13537490781453873342/161622044185347541*n^20 + 536327339450715052151/161622044185347541*n^19 - 13371369101736083422794/161622044185347541*n^18 + 235455918475417219649442/161622044185347541*n^17 - 3116006236125081609967836/161622044185347541*n^16 + 32206915612050300256229182/161622044185347541*n^15 - 266896215511381548894368148/161622044185347541*n^14 + 1807936548660186327554701673/161622044185347541*n^13 - 10165019365169563182405402870/161622044185347541*n^12 + 48020298726375566176750719243/161622044185347541*n^11 - 192241318016911683660856825122/161622044185347541*n^10 + 654244522512868452437275902064/161622044185347541*n^9 - 1886334264723583247117894427984/161622044185347541*n^8 + 4572325099786289879477471345264/161622044185347541*n^7 - 9286619685461737645895817896736/161622044185347541*n^6 + 16057391376963298780729705553280/161622044185347541*n^5 - 24549773581546735713296347219968/161622044185347541*n^4 + 33271734334168099761881310812160/161622044185347541*n^3 - 34872618769739605938773110579200/161622044185347541*n^2 + 19584441353853938763900002304000/161622044185347541*n - 7561714896123855667200000/161622044185347541)
phi(n,29)=(126976993267009/16908182376426012672000000) * (n - 7) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^21 - 241470904706741286/2920470845141207*n^20 + 66147349984226271163/20443295915988449*n^19 - 232903731633466177008/2920470845141207*n^18 + 28407778253142909105750/20443295915988449*n^17 - 53197055161385278952916/2920470845141207*n^16 + 545135974494579493459418/2920470845141207*n^15 - 4482586426687850034641016/2920470845141207*n^14 + 211087575846701042720107981/20443295915988449*n^13 - 168573615429727586653651206/2920470845141207*n^12 + 5553537111516468368256005199/20443295915988449*n^11 - 3174388673032555193294098344/2920470845141207*n^10 + 10843112224166117984460867956/2920470845141207*n^9 - 31503272996868792166905862896/2920470845141207*n^8 + 539586254664209929747077085072/20443295915988449*n^7 - 157736801796344856533000639232/2920470845141207*n^6 + 1915672548588937007491980088128/20443295915988449*n^5 - 420908875332867472630098237696/2920470845141207*n^4 + 584775582811595546982090347520/2920470845141207*n^3 - 643606401503582558234670182400/2920470845141207*n^2 + 384774974524711808948072448000/2920470845141207*n - 3354798090560716800000/126976993267009)
phi(n,30)=(4124723711277527173/2210440498434925488635904000000) * (n - 7) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^22 - 365906468313925236208/4124723711277527173*n^21 + 15400947194420640044591/4124723711277527173*n^20 - 409382347019764223274680/4124723711277527173*n^19 + 7716910080615287849887674/4124723711277527173*n^18 - 109799100242101973251914960/4124723711277527173*n^17 + 1225567905002068666605482638/4124723711277527173*n^16 - 11013711494159330332142934160/4124723711277527173*n^15 + 81203404790639796045180403625/4124723711277527173*n^14 - 498565616370902674543343571632/4124723711277527173*n^13 + 2581628415056683002805139205315/4124723711277527173*n^12 - 11397974472614085025775447280120/4124723711277527173*n^11 + 43241986750015142037272078440936/4124723711277527173*n^10 - 141248551552266434897308156003024/4124723711277527173*n^9 + 394971253953806760500497953570992/4124723711277527173*n^8 - 935060634639032483305848996287360/4124723711277527173*n^7 + 1862111074394005484577227048788992/4124723711277527173*n^6 - 3169250113267513377755973533074176/4124723711277527173*n^5 + 4821802185613389350910100533310464/4124723711277527173*n^4 - 6637499328812096585844753564487680/4124723711277527173*n^3 + 7195918743641319060103811551641600/4124723711277527173*n^2 - 4216893560771193738155674386432000/4124723711277527173*n + 438579463975183628697600000/4124723711277527173)
phi(n,31)=(4316881964464228949/9473316421863966379868160000000) * (n - 7) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^23 - 2866142475114785581696/30218173751249602643*n^22 + 18466430676253067299483/4316881964464228949*n^21 - 527259390390162805308320/4316881964464228949*n^20 + 10704775501626053700281574/4316881964464228949*n^19 - 164544867687546061265198928/4316881964464228949*n^18 + 1990646558700753357782992358/4316881964464228949*n^17 - 136178384237442167661338597440/30218173751249602643*n^16 + 156462888569421632717837137009/4316881964464228949*n^15 - 1050498907938346643820871401248/4316881964464228949*n^14 + 5958651939314165173367095947903/4316881964464228949*n^13 - 28861326889487755833631268389920/4316881964464228949*n^12 + 120486274884767745259613488555364/4316881964464228949*n^11 - 3053164863652431723673962855894256/30218173751249602643*n^10 + 1369199427719329217736323713584688/4316881964464228949*n^9 - 3699110056609150038376193036741120/4316881964464228949*n^8 + 8498907597163222437535318974880704/4316881964464228949*n^7 - 16512566013613556966987746262546688/4316881964464228949*n^6 + 27623893147822183246101289030445568/4316881964464228949*n^5 - 291349100380589417129475506076887040/30218173751249602643*n^4 + 56790013126929553910103431412326400/4316881964464228949*n^3 - 60680462345327454331988896985088000/4316881964464228949*n^2 + 34891013115177394546514229166080000/4316881964464228949*n - 1879626274179358408704000000/4316881964464228949)
phi(n,32)=(89977183463520069683/822283865417792281772556288000000) * (n - 7) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^24 - 45482524265008926524226/449885917317600348415*n^23 + 2190783935135840547857257/449885917317600348415*n^22 - 66949617604232809130026062/449885917317600348415*n^21 + 291659532310859477037043274/89977183463520069683*n^20 - 24113449795239159294438043356/449885917317600348415*n^19 + 314748439066548540255860575042/449885917317600348415*n^18 - 3329294399984386949953140347772/449885917317600348415*n^17 + 5814757697517040224058425360599/89977183463520069683*n^16 - 212548683264645748662486051116826/449885917317600348415*n^15 + 1315529643183527121438604919393557/449885917317600348415*n^14 - 6962112627714366181803195735163062/449885917317600348415*n^13 + 6359686591662573078201459174953564/89977183463520069683*n^12 - 126348371978588649952830688859711976/449885917317600348415*n^11 + 438742915455734836745678891009913232/449885917317600348415*n^10 - 1329087418904353188860511968378265312/449885917317600348415*n^9 + 696082256257000126855074652070137664/89977183463520069683*n^8 - 7780574237624231127774340904065094016/449885917317600348415*n^7 + 14780459237121675397517110417589478912/449885917317600348415*n^6 - 24345488737682926300562480792638497792/449885917317600348415*n^5 + 7272249564936017282526575221716873216/89977183463520069683*n^4 - 9838535733079508843071537155186769920/89977183463520069683*n^3 + 10366524690108354474714696238483046400/89977183463520069683*n^2 - 5854066701679113907297788639903744000/89977183463520069683*n + 163151560598768309875507200000/89977183463520069683)
phi(n,33)=(212554260555057380441/8222838654177922817725562880000000) * (n - 7) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^25 - 22841179412784815646212/212554260555057380441*n^24 + 1171565345176660055335994/212554260555057380441*n^23 - 38198604246071975972346104/212554260555057380441*n^22 + 889597792991485526877265715/212554260555057380441*n^21 - 15764256706179169497712390652/212554260555057380441*n^20 + 221098374926220235541148703424/212554260555057380441*n^19 - 2520243297922310500083523959104/212554260555057380441*n^18 + 23789907692409650669421630871295/212554260555057380441*n^17 - 188559305572493743248724653878012/212554260555057380441*n^16 + 1268503882359492401764457180946914/212554260555057380441*n^15 - 7309609179925212380581328697770264/212554260555057380441*n^14 + 36387773508854961347273006962323365/212554260555057380441*n^13 - 157775139632546524134368540028468932/212554260555057380441*n^12 + 599987943027412842862766838620629124/212554260555057380441*n^11 - 2007385464078415526448380729642237744/212554260555057380441*n^10 + 5888538556913828016624188387662374320/212554260555057380441*n^9 - 14986866346895059745787643630635722432/212554260555057380441*n^8 + 32671577091716795520038340778515313344/212554260555057380441*n^7 - 60797843204069380542076895257563542784/212554260555057380441*n^6 + 98746793309009707799977149035672484864/212554260555057380441*n^5 - 146312347031575610698325514994180853760/212554260555057380441*n^4 + 196324356627996924172726168663663411200/212554260555057380441*n^3 - 204089370697988026036841420234440704000/212554260555057380441*n^2 + 113285247290601447441545783855677440000/212554260555057380441*n - 1631515605987683098755072000000/212554260555057380441)
phi(n,34)=(52186344919471715951861/8683317618811886495518194401280000000) * (n - 7) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^26 - 5945873214077431546955860/52186344919471715951861*n^25 + 323894937743906651776558190/52186344919471715951861*n^24 - 11235453717911214552150669832/52186344919471715951861*n^23 + 278906950102585427944472308619/52186344919471715951861*n^22 - 5279048584113993454825569480124/52186344919471715951861*n^21 + 79265137538137184296000344861800/52186344919471715951861*n^20 - 969780051508985569307578572493792/52186344919471715951861*n^19 + 9853462492299709525180019600986379/52186344919471715951861*n^18 - 84312779423481430813362986746128844/52186344919471715951861*n^17 + 614047763293113761495184609129330950/52186344919471715951861*n^16 - 3839270737932365295677370177426854632/52186344919471715951861*n^15 + 20766414234053344147682011322128437989/52186344919471715951861*n^14 - 97904121979936355441276135321504145124/52186344919471715951861*n^13 + 405293396096052741406599856079057807300/52186344919471715951861*n^12 - 1481981273712186470652076851938870829232/52186344919471715951861*n^11 + 4795155934967906074468293615731027085104/52186344919471715951861*n^10 - 13661033513576548108706199230313079071424/52186344919471715951861*n^9 + 33870195101203666927909620793177268510400/52186344919471715951861*n^8 - 72142036827614738219825497371804104109312/52186344919471715951861*n^7 + 131724082463699638085159866590834865026048/52186344919471715951861*n^6 - 211235902966375496744913667263484149018624/52186344919471715951861*n^5 + 310713110206453617860824699912721556111360/52186344919471715951861*n^4 - 413614967380075550257421641762022601523200/52186344919471715951861*n^3 + 424415728453875639853421638146448687104000/52186344919471715951861*n^2 - 231746120730406899467208584760278384640000/52186344919471715951861*n + 1722880479922993352285356032000000/52186344919471715951861)
phi(n,35)=(101547230577505630765943/73808199759901035211904652410880000000) * (n - 7) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^27 - 12238531225557168248641425/101547230577505630765943*n^26 + 706329758321726990812565994/101547230577505630765943*n^25 - 26001146493629322938923696566/101547230577505630765943*n^24 + 686121570866687333134238243001/101547230577505630765943*n^23 - 13830260645989021659436710941055/101547230577505630765943*n^22 + 221595714414402565071046825358328/101547230577505630765943*n^21 - 2899572821688904829886032603825496/101547230577505630765943*n^20 + 31588509780486803542040753891435721/101547230577505630765943*n^19 - 290612498826938935840957489433659215/101547230577505630765943*n^18 + 2282111872115646456679805428573283058/101547230577505630765943*n^17 - 15425099371338577373410574358415883406/101547230577505630765943*n^16 + 90373118542360006636547767362475109751/101547230577505630765943*n^15 - 461995083482616016084339506436475511825/101547230577505630765943*n^14 + 2074721581101463115020059726007962406668/101547230577505630765943*n^13 - 8239775649886511781248852179666190417796/101547230577505630765943*n^12 + 29086188007674457008370909701171538248816/101547230577505630765943*n^11 - 91305832330083903332971863575961961341360/101547230577505630765943*n^10 + 253258360587476626609388846939065478886208/101547230577505630765943*n^9 - 612902334807672170526647705900589562013376/101547230577505630765943*n^8 + 1277618207796363137376711453326324914733568/101547230577505630765943*n^7 - 2292295634863042903449595454906795310981120/101547230577505630765943*n^6 + 3633596449128523700726583143152361264799744/101547230577505630765943*n^5 - 5309035525885995521554923173646091348623360/101547230577505630765943*n^4 + 7012879057073311071108228803867712631603200/101547230577505630765943*n^3 - 7106156728107859279076131717816830787584000/101547230577505630765943*n^2 + 3819770862577210946766747471964211773440000/101547230577505630765943*n - 14644484079345443494425526272000000/101547230577505630765943)
phi(n,36)=(40072621279540027417607/129164349579826811620833141719040000000) * (n - 7) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^28 - 20390937908180396466884051/160290485118160109670428*n^27 + 1244045469653947958970314013/160290485118160109670428*n^26 - 24242580891180574837810266777/80145242559080054835214*n^25 + 678360277178280629114140666953/80145242559080054835214*n^24 - 29047511943910664228535944912157/160290485118160109670428*n^23 + 495219368085571851210899270817627/160290485118160109670428*n^22 - 1727097819435893240721697167732030/40072621279540027417607*n^21 + 20103686661900160004951680512037479/40072621279540027417607*n^20 - 792430540179620526156442289305282797/160290485118160109670428*n^19 + 6683361581200473995657212426415203827/160290485118160109670428*n^18 - 24324730175851630142652202497995911245/80145242559080054835214*n^17 + 153848929171640923862066103376109550753/80145242559080054835214*n^16 - 1700929708549842717960123973027584471507/160290485118160109670428*n^15 + 8265963893542554291876431472441925348677/160290485118160109670428*n^14 - 8883441674404682504804502481318518758055/40072621279540027417607*n^13 + 33988117474929270358115190071094269932389/40072621279540027417607*n^12 - 116219272829743657934028796004266699830828/40072621279540027417607*n^11 + 354911580704514034095261096187362438957148/40072621279540027417607*n^10 - 960493292933766263683791582145302648802960/40072621279540027417607*n^9 + 2272803532080382379449961802803268981175152/40072621279540027417607*n^8 - 4643567806580275054985188368125151659094144/40072621279540027417607*n^7 + 8197449555511184195522627650333768181538816/40072621279540027417607*n^6 - 12857208972871232340034549548947975007442944/40072621279540027417607*n^5 + 18669395159765241172407606627383692043243520/40072621279540027417607*n^4 - 24476335385671055892388352854406801139302400/40072621279540027417607*n^3 + 24502569442320176859073819179548317483008000/40072621279540027417607*n^2 - 12974357041082177615786430498142586142720000/40072621279540027417607*n + 25627847138854526115244670976000000/40072621279540027417607)
phi(n,37)=(6411361963486283625348677/92998331697475304366999862037708800000000) * (n - 8) * (n - 7) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^28 - 807873312880171300151821068/6411361963486283625348677*n^27 + 48833118182597523282181269225/6411361963486283625348677*n^26 - 1886112142403423045328524564460/6411361963486283625348677*n^25 + 52317338554195976243202793843725/6411361963486283625348677*n^24 - 1110706570079010317050470376509420/6411361963486283625348677*n^23 + 18784702773914862210578184350051085/6411361963486283625348677*n^22 - 260102810967693737659768089443818620/6411361963486283625348677*n^21 + 3007389487578277729379175152771219955/6411361963486283625348677*n^20 - 29464885546231593628871026694054919540/6411361963486283625348677*n^19 + 247336232582109642055413148398222015435/6411361963486283625348677*n^18 - 1793859912052966983972319375550188980420/6411361963486283625348677*n^17 + 11315443392719028970349372906317537543215/6411361963486283625348677*n^16 - 62430694160821871407941661733520603774180/6411361963486283625348677*n^15 + 302987449049684098214570573365488699517935/6411361963486283625348677*n^14 - 1301627967196000300942276895985913692774420/6411361963486283625348677*n^13 + 4982964732241964041755413173064783021582220/6411361963486283625348677*n^12 - 17087165868916433826895311290273301732366000/6411361963486283625348677*n^11 + 52496306165672099661777941149046625797017360/6411361963486283625348677*n^10 - 143395313226208433939156606967706350358173120/6411361963486283625348677*n^9 + 343123620448417038607594131114280581466905408/6411361963486283625348677*n^8 - 708269217678116862970306736723225764680513792/6411361963486283625348677*n^7 + 1258022476807643071863543046769203982692008960/6411361963486283625348677*n^6 - 1976707533798389497460428091471107428366888960/6411361963486283625348677*n^5 + 2889611393510687728686216207350793276439756800/6411361963486283625348677*n^4 - 3884948294406842788931291168201237281898496000/6411361963486283625348677*n^3 + 4062597940225854728544257734711176794603520000/6411361963486283625348677*n^2 - 2268399787845009432022656890024344407244800000/6411361963486283625348677*n + 2306506242496907350372020387840000000/6411361963486283625348677)
phi(n,38)=(103934245966183708231997989/6881876545613172523157989790790451200000000) * (n - 8) * (n - 7) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^29 - 13812676201242831069852750022/103934245966183708231997989*n^28 + 881831398044718086572315025369/103934245966183708231997989*n^27 - 36024270630939037315780679376270/103934245966183708231997989*n^26 + 1058410089828351032537848112169885/103934245966183708231997989*n^25 - 23835047429563143719240143247039190/103934245966183708231997989*n^24 + 428223042662548848898910780970528765/103934245966183708231997989*n^23 - 6308642404044842618993674279399100070/103934245966183708231997989*n^22 + 77741470679032042589664179465058848835/103934245966183708231997989*n^21 - 813389516942662222483876524992577095370/103934245966183708231997989*n^20 + 7308179423444646879031131902489836741275/103934245966183708231997989*n^19 - 56879673431520624625695351956258452016970/103934245966183708231997989*n^18 + 386046438412557093047794989771040691042655/103934245966183708231997989*n^17 - 2297063479912949133545100554279496488289330/103934245966183708231997989*n^16 + 12040362520905868435521307653024624628424895/103934245966183708231997989*n^15 - 55879485690063923123067973694193460323671970/103934245966183708231997989*n^14 + 230982555856241280379341189548616489678269340/103934245966183708231997989*n^13 - 855699834338668567987043593976857691244403560/103934245966183708231997989*n^12 + 2853398421083940540427295373183509332291118480/103934245966183708231997989*n^11 - 8555538398711690250836460470116918317470983520/103934245966183708231997989*n^10 + 22859514698719455992868748293139988782054510656/103934245966183708231997989*n^9 - 53586957081471617174822439212866576813480787328/103934245966183708231997989*n^8 + 108568536043625607607928284433473569642559497216/103934245966183708231997989*n^7 - 189937620458175098743559624442448391322200371200/103934245966183708231997989*n^6 + 295574773296029649710377458820072375112021360640/103934245966183708231997989*n^5 - 429823190246570203934405645557093436769674035200/103934245966183708231997989*n^4 + 573981982357141648152260154511592303723249664000/103934245966183708231997989*n^3 - 593213374908514452448474068674524010733895680000/103934245966183708231997989*n^2 + 326363486458576428157899637813054817776435200000/103934245966183708231997989*n - 170681461944771143927529508700160000000/103934245966183708231997989)
phi(n,39)=(121899971511204409027627313/37358758390471507982857658864291020800000000) * (n - 8) * (n - 7) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^30 - 119362258354345763612043013240/853299800578430863193391191*n^29 + 8031677249256460505429992755983/853299800578430863193391191*n^28 - 346294444216827098820507700278456/853299800578430863193391191*n^27 + 10753182159102161360499731141569995/853299800578430863193391191*n^26 - 256291491812831158230766913994121320/853299800578430863193391191*n^25 + 4880068976093935325055756598048250235/853299800578430863193391191*n^24 - 76303444711947717907781605249969206840/853299800578430863193391191*n^23 + 999460528218559435613923886717357500125/853299800578430863193391191*n^22 - 11133840120898001763679749069546687148440/853299800578430863193391191*n^21 + 106717582917674227213759053065925684560205/853299800578430863193391191*n^20 - 888079710200306343051601212473978964746280/853299800578430863193391191*n^19 + 6461067712991993865789901467266539872061305/853299800578430863193391191*n^18 - 41315898554457963100876124356031087630454840/853299800578430863193391191*n^17 + 33318778328974067796679990922377935757441935/121899971511204409027627313*n^16 - 1167108066503389852004379954010609823952571560/853299800578430863193391191*n^15 + 5201469254484456326178479375816789973154424520/853299800578430863193391191*n^14 - 20762117449217887760417510925046849157809001040/853299800578430863193391191*n^13 + 74655560480245539961793252275503124217625543040/853299800578430863193391191*n^12 - 242673533472439845660974398213011988749587470400/853299800578430863193391191*n^11 + 711481011196807830076741337996695962371227479424/853299800578430863193391191*n^10 - 1862283104188028890628186516200766867015516793600/853299800578430863193391191*n^9 + 4282070238513461636565957737916645882254942875392/853299800578430863193391191*n^8 - 8524748528182902810614552144737727374001357374464/853299800578430863193391191*n^7 + 14704500916570361343654815423060025412341967933440/853299800578430863193391191*n^6 - 3240091191806506469336126715735269869292350095360/121899971511204409027627313*n^5 + 32821540938911006019399482205608688038975117721600/853299800578430863193391191*n^4 - 6220010675682169656883823171886960031558926336000/121899971511204409027627313*n^3 + 6355588869044068348459090212436136985789726720000/121899971511204409027627313*n^2 - 3447279034578431712703258530656185494326476800000/121899971511204409027627313*n + 926556507700186209892303047229440000000/121899971511204409027627313)
phi(n,40)=(244614646508884108076020747/351687622089611092390349685170739609600000000) * (n - 8) * (n - 7) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^31 - 1042491305724518334085782341643/7093824748757639134204601663*n^30 + 73789774369721297892692966152519/7093824748757639134204601663*n^29 - 3351157573072205670197298883057851/7093824748757639134204601663*n^28 + 109756228418419271846880866862762099/7093824748757639134204601663*n^27 - 2762821869889788840311293799891749815/7093824748757639134204601663*n^26 + 55635226670961912732861523035287583795/7093824748757639134204601663*n^25 - 921190043405388688827636916780746279255/7093824748757639134204601663*n^24 + 12794983259973933978529828479645419887125/7093824748757639134204601663*n^23 - 151362113571701033828512627223904095487585/7093824748757639134204601663*n^22 + 1543187469092880644961968350792848685258485/7093824748757639134204601663*n^21 - 13686192598790131205381316652022456285592945/7093824748757639134204601663*n^20 + 106356314143117437361078252151090833178787825/7093824748757639134204601663*n^19 - 728263777570067482379780047032833783736234525/7093824748757639134204601663*n^18 + 4413019943015891564644189764929921125991634705/7093824748757639134204601663*n^17 - 23750601658027828128708053831612520150356797725/7093824748757639134204601663*n^16 + 113942936894652779041944531629749237505602632840/7093824748757639134204601663*n^15 - 489423764704526541982459323095529793884747477120/7093824748757639134204601663*n^14 + 1892373018611112933894548832625613840859858562240/7093824748757639134204601663*n^13 - 6621944073585350911650514007756642115713341383840/7093824748757639134204601663*n^12 + 21027426725320448058792104695716444631963054239872/7093824748757639134204601663*n^11 - 60381254465848289391918145733562937706351032902912/7093824748757639134204601663*n^10 + 155029480113946396629034826393147747865555684293376/7093824748757639134204601663*n^9 - 350040201383783930119050414894710003527591754313984/7093824748757639134204601663*n^8 + 685437093671481156591695980743472169529260906520576/7093824748757639134204601663*n^7 - 1166815478565506623333701058671572791115337311846400/7093824748757639134204601663*n^6 + 1785116135340502114458028351539111044764444910714880/7093824748757639134204601663*n^5 - 2571498628919885013509211759703644951812149724774400/7093824748757639134204601663*n^4 + 3389173223846789153430151908268992949174915104768000/7093824748757639134204601663*n^3 - 118103468663684338468334467998023425056626442240000/244614646508884108076020747*n^2 + 1832521873823279736458934848993073764578256486400000/7093824748757639134204601663*n - 8722411262143132251744783858401280000000/244614646508884108076020747)
phi(n,41)=(7462517134503012306034033777/50994705202993608396600704349757243392000000000) * (n - 8) * (n - 7) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^32 - 1150114332909419383823695116628/7462517134503012306034033777*n^31 + 85478473458321519179518402939820/7462517134503012306034033777*n^30 - 4081281900572737986298481429045720/7462517134503012306034033777*n^29 + 140713136436213383081901068554045248/7462517134503012306034033777*n^28 - 3733609511774485559628760893966832392/7462517134503012306034033777*n^27 + 79352173365255370844760482353666550940/7462517134503012306034033777*n^26 - 1388495630366341636265824755119464685400/7462517134503012306034033777*n^25 + 20406557083072152930748624935956051243130/7462517134503012306034033777*n^24 - 255766138845088137455431733368135756620720/7462517134503012306034033777*n^23 + 2766608042076001302084982665129394391440500/7462517134503012306034033777*n^22 - 26074318811859125792023545190512276462772200/7462517134503012306034033777*n^21 + 215737615226439831213801744080068485934809960/7462517134503012306034033777*n^20 - 1576370940257166706201225159419063253968467640/7462517134503012306034033777*n^19 + 10218316360846968924814162679384495516079671700/7462517134503012306034033777*n^18 - 58967067105490386366345182357038232220863209800/7462517134503012306034033777*n^17 + 303852153226419158476003280295998758809381488205/7462517134503012306034033777*n^16 - 1402684224987976275215483089310258961627102159420/7462517134503012306034033777*n^15 + 5825385845496627171299796603195596988984496305200/7462517134503012306034033777*n^14 - 21878308167067822722995859555639071246847028637600/7462517134503012306034033777*n^13 + 74675678463335511051526535557626458401860498736288/7462517134503012306034033777*n^12 - 232072222036558884914143154952681790893212173733632/7462517134503012306034033777*n^11 + 653642866645672491036815957244993595012099749818880/7462517134503012306034033777*n^10 - 1648090092669442209386369972596439752768948739105280/7462517134503012306034033777*n^9 + 3657711027871454856989827417069366622572220212699392/7462517134503012306034033777*n^8 - 7051474284324045498365402513891382246322428924269568/7462517134503012306034033777*n^7 + 11856298004031879281988937230177030623200434079272960/7462517134503012306034033777*n^6 - 18003303833147017784054651197137911088561691244544000/7462517134503012306034033777*n^5 + 25822919405831314759499230884090076710601860562944000/7462517134503012306034033777*n^4 - 33817577221432389924117512318102622684468137164800000/7462517134503012306034033777*n^3 + 33810732315138726499580253149956679520355811328000000/7462517134503012306034033777*n^2 - 17853902668003479425801282394834814299758395392000000/7462517134503012306034033777*n + 1264749633010754176502993659468185600000000/7462517134503012306034033777)
phi(n,42)=(10169562831441321164789189207/334525266131638071081700620534407516651520000000) * (n - 8) * (n - 7) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^33 - 41025358664101065697462572830248/254239070786033029119729730175*n^32 + 3196094599361176927337311724246952/254239070786033029119729730175*n^31 - 6406072467070400380805368935285920/10169562831441321164789189207*n^30 + 1160409501417136875748705965187146596/50847814157206605823945946035*n^29 - 161970381305996685423927000792762580512/254239070786033029119729730175*n^28 + 3626387418980031371078230031993800299048/254239070786033029119729730175*n^27 - 13385611472752686345276909183338750895552/50847814157206605823945946035*n^26 + 41549775288097502968309880647760361324474/10169562831441321164789189207*n^25 - 2753009316019655888860254134942801310691824/50847814157206605823945946035*n^24 + 31524126421792019127551524627094966972464776/50847814157206605823945946035*n^23 - 62987799784499779168139187280642579637081856/10169562831441321164789189207*n^22 + 553317643569332982964814957709995502692299092/10169562831441321164789189207*n^21 - 21503522912244698472680849954393246669688048288/50847814157206605823945946035*n^20 + 148605339024714489974133051197009090877925875192/50847814157206605823945946035*n^19 - 183293559318959227155137001528748200915168451392/10169562831441321164789189207*n^18 + 1011628063992350463816825927814270223320321210023/10169562831441321164789189207*n^17 - 25047627498109171207327890186635902855201441585224/50847814157206605823945946035*n^16 + 111621743290958675309385646154857823375790480776816/50847814157206605823945946035*n^15 - 89893874620612689551893169021818360453398369317984/10169562831441321164789189207*n^14 + 328728038492936981382666397376546186775831289252704/10169562831441321164789189207*n^13 - 27416155422326921809959469085985862996578239499478912/254239070786033029119729730175*n^12 + 83521155848153359669046150815942104971411716272831488/254239070786033029119729730175*n^11 - 9241090632809534837323401252063836694630621036879360/10169562831441321164789189207*n^10 + 114525711639022647107984883833676846934282228047247104/50847814157206605823945946035*n^9 - 1250296545661883351294797565958680204956275331658907648/254239070786033029119729730175*n^8 + 2375028731626862302431001833417052078322613707901038592/254239070786033029119729730175*n^7 - 789478324909109318580072771487235208319209482355621888/50847814157206605823945946035*n^6 + 238102596665299345914389032927820041318856668784885760/10169562831441321164789189207*n^5 - 340136013144558847050848480118999711152493941760983040/10169562831441321164789189207*n^4 + 442658988494636272073695822532207379277013452062720000/10169562831441321164789189207*n^3 - 437988535979762136950010446041361514256294572195840000/10169562831441321164789189207*n^2 + 228370155723911439695147443797755943692773380587520000/10169562831441321164789189207*n - 8296757592550547397859638406111297536000000/10169562831441321164789189207)
phi(n,43)=(1460627002655686080234660853327/234167686292146649757190434374085261656064000000000) * (n - 8) * (n - 7) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^34 - 246402575148770143356354371966028/1460627002655686080234660853327*n^33 + 20089700744831507169478011591870664/1460627002655686080234660853327*n^32 - 1054720282043671441138481185821014416/1460627002655686080234660853327*n^31 + 40082125594234697519041813685117931268/1460627002655686080234660853327*n^30 - 1175159203468622496568191819146743577312/1460627002655686080234660853327*n^29 + 27666899721805716779172987005358968566776/1460627002655686080234660853327*n^28 - 537586996611965391562022631362374348405104/1460627002655686080234660853327*n^27 + 8794662957321655653515933086602240889984410/1460627002655686080234660853327*n^26 - 122986629318209690310911244223147808452509720/1460627002655686080234660853327*n^25 + 1487837501646182166733280817099454170014010360/1460627002655686080234660853327*n^24 - 15722130859474233244274886973796948687300253840/1460627002655686080234660853327*n^23 + 146275551068562456379378495267625670697738981860/1460627002655686080234660853327*n^22 - 1206030754115269554093541846436035889260969501440/1460627002655686080234660853327*n^21 + 8857920192824814954498942606649067154575239400520/1460627002655686080234660853327*n^20 - 58187902118561731728085561736950385984232647219280/1460627002655686080234660853327*n^19 + 342889913034645795754092581352823389857592881336655/1460627002655686080234660853327*n^18 - 1816749015215605132470486610319230615344922597925820/1460627002655686080234660853327*n^17 + 8673722371988372480200387299301215972516803739570560/1460627002655686080234660853327*n^16 - 37420286217231340905960985606574400989613417144951840/1460627002655686080234660853327*n^15 + 146461734038194512153710976126837828747906205224545888/1460627002655686080234660853327*n^14 - 522610477947355442871796907088430513315059966202130432/1460627002655686080234660853327*n^13 + 1707050555605912928036518581253747666743866465914006016/1460627002655686080234660853327*n^12 - 5105040598220803562669892581733915910807920880035311104/1460627002655686080234660853327*n^11 + 13883443345949227607809379903195135939225032128247087872/1460627002655686080234660853327*n^10 - 33858603807851303415784120705065112867914892278835381248/1460627002655686080234660853327*n^9 + 72789927112327591806601004392219243540169006158849327104/1460627002655686080234660853327*n^8 - 136347393848729503996487170084824062194972051813446844416/1460627002655686080234660853327*n^7 + 224166299782404593599474662378374761892327624574805278720/1460627002655686080234660853327*n^6 - 335878925480412608741633230000249568301317846923051008000/1460627002655686080234660853327*n^5 + 477964568058987291341030515497632686100892789071413248000/1460627002655686080234660853327*n^4 - 618215000062200977857352444580931392562249696542720000000/1460627002655686080234660853327*n^3 + 605541780889949879670824090874964204513088007831552000000/1460627002655686080234660853327*n^2 - 311898799773777528627004104285583349027593953214464000000/1460627002655686080234660853327*n + 5807730314785383178501746884277908275200000000/1460627002655686080234660853327)
phi(n,44)=(223375101866658107839353978551/176652815974777297185248924176941513179136000000000) * (n - 8) * (n - 7) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^35 - 2242333618879981125067533553814971/12732380806399512146843176777407*n^34 + 63683298301719706063127357642760166/4244126935466504048947725592469*n^33 - 10492724460935270721805607182752918656/12732380806399512146843176777407*n^32 + 417602157351988325944298545998811327876/12732380806399512146843176777407*n^31 - 4279091171783133346420263148138291541548/4244126935466504048947725592469*n^30 + 317260455192899359067909436648782521500512/12732380806399512146843176777407*n^29 - 2159631360312761148842144133256248548921848/4244126935466504048947725592469*n^28 + 37175356139180715721103076906198843638412894/4244126935466504048947725592469*n^27 - 547633230772441799716174687579791016629047110/4244126935466504048947725592469*n^26 + 6986432578545479777477581866364138048203516140/4244126935466504048947725592469*n^25 - 77937153436886021828095429577222484042445180680/4244126935466504048947725592469*n^24 + 766346588543629861386509637974820538823285107660/4244126935466504048947725592469*n^23 - 6686322845018613251196376752244752243258115116460/4244126935466504048947725592469*n^22 + 52048862847734150110729304111863830337063496620080/4244126935466504048947725592469*n^21 - 363071857798010076183126447109284183934098424546760/4244126935466504048947725592469*n^20 + 119842433150827506608464124233853469248416322208535/223375101866658107839353978551*n^19 - 677346743046214079662481644790535554693912977797795/223375101866658107839353978551*n^18 + 3456551243672962603824588661248631514867315767872810/223375101866658107839353978551*n^17 - 909514230943271013457354091002692122464539854749897640/12732380806399512146843176777407*n^16 + 1269415981164830819631512520419395410656033945092657376/4244126935466504048947725592469*n^15 - 14520028444316698104148277794672477641038996902545243424/12732380806399512146843176777407*n^14 + 50651771801838755370745703742529852727838118446642475712/12732380806399512146843176777407*n^13 - 54083532586727074801708701121613857459427623556928946688/4244126935466504048947725592469*n^12 + 476920023214408076523563013770947765636414105428337901824/12732380806399512146843176777407*n^11 - 425480162711656477147238268199480494444892924255450177792/4244126935466504048947725592469*n^10 + 1021798131537880231165437011380362278777572695298394082816/4244126935466504048947725592469*n^9 - 2164458121696950696649275766355397038618515349083795310592/4244126935466504048947725592469*n^8 + 4000852747469210653866738228079658532964976979166702657536/4244126935466504048947725592469*n^7 - 6510938243701843205756995112176893577285354627826024939520/4244126935466504048947725592469*n^6 + 9697964798194952428094895144276541058518842796676186112000/4244126935466504048947725592469*n^5 - 13749788668957413469531310171938053917103677918082367488000/4244126935466504048947725592469*n^4 + 17677171478616570866325728300034736321897064695411507200000/4244126935466504048947725592469*n^3 - 17145580061763142361536939266535779219996553214164992000000/4244126935466504048947725592469*n^2 + 459350568676924473861434231470206140811257195790336000000/223375101866658107839353978551*n - 4381270237469675029396054667086843084800000000/223375101866658107839353978551)
phi(n,45)=(4676724677977797914458050535741/18460219269364227555858512576490388127219712000000000) * (n - 8) * (n - 7) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^36 - 858716629975693254924859774090822/4676724677977797914458050535741*n^35 + 229054465303916026321275263373084847/14030174033933393743374151607223*n^34 - 13141028529958505408861159623329166336/14030174033933393743374151607223*n^33 + 182299114348787250615843172311984133452/4676724677977797914458050535741*n^32 - 5866406365574909779076894354489168833736/4676724677977797914458050535741*n^31 + 455834383602094303243423404024845884748828/14030174033933393743374151607223*n^30 - 9767076757338416699298971876253012318325424/14030174033933393743374151607223*n^29 + 58869665844998555459392619512474677324518902/4676724677977797914458050535741*n^28 - 911980898072544139176372369630504796130206532/4676724677977797914458050535741*n^27 + 12248313532841860007937502846256305419976288950/4676724677977797914458050535741*n^26 - 143990771075758264429673620150022276048541325680/4676724677977797914458050535741*n^25 + 1493561722052942733373823937811931175121288466500/4676724677977797914458050535741*n^24 - 13761295788410635023632156125190604175968959430280/4676724677977797914458050535741*n^23 + 113266392183544894240661829224905927718849590622020/4676724677977797914458050535741*n^22 - 836709711769145211154754439505799457979267984366960/4676724677977797914458050535741*n^21 + 5567684256445768282954994808786129033985536655174005/4676724677977797914458050535741*n^20 - 33463631292014576296134834426583790540924307446300070/4676724677977797914458050535741*n^19 + 182008828148345941250072627483275050278744560942068685/4676724677977797914458050535741*n^18 - 897169729063350994313088574308311570701784383169355280/4676724677977797914458050535741*n^17 + 12044093321811048218713852502080361750006837118219030872/14030174033933393743374151607223*n^16 - 49054520990506391017726489561694482615917571789507758464/14030174033933393743374151607223*n^15 + 60852936051762882373458846768757849517890912605772004256/4676724677977797914458050535741*n^14 - 207882607867592572834612568215328941451207788719209984128/4676724677977797914458050535741*n^13 + 1961833949542475597123674014113097306315329471860992169984/14030174033933393743374151607223*n^12 - 5674250380052380199161815386228177479998775674897258606592/14030174033933393743374151607223*n^11 + 4986287417681460444261029288748829298019009776963365890304/4676724677977797914458050535741*n^10 - 11800328082395613719079112464872339167400801908938792364032/4676724677977797914458050535741*n^9 + 24646365023235886562187151275482924165264499837305581160448/4676724677977797914458050535741*n^8 - 44985127694273757388275664510091286195589589001478790750208/4676724677977797914458050535741*n^7 + 72508829136112106578276748205832209102795837528260568514560/4676724677977797914458050535741*n^6 - 107408676755242033218415253467469104165515944374731325440000/4676724677977797914458050535741*n^5 + 151748962651221411499094083217969793867911970513227218944000/4676724677977797914458050535741*n^4 - 193936473583798654506249660869673670020799218121939353600000/4676724677977797914458050535741*n^3 + 186316692377109578977103145959429030881103801806749696000000/4676724677977797914458050535741*n^2 - 93766081346972361249013136522331383386286267943616512000000/4676724677977797914458050535741*n + 457842739815581040571887712710575102361600000000/4676724677977797914458050535741)
phi(n,46)=(88268007721414548410430057629491/1759150306845296978852399433759672280358584320000000000) * (n - 9) * (n - 8) * (n - 7) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^36 - 273408203117699338430012889968958285/1500556131264047322977310979701347*n^35 + 24127238914478503464005588534098725480/1500556131264047322977310979701347*n^34 - 1374107007766519316897541076243872870000/1500556131264047322977310979701347*n^33 + 56784554054413762895965496098578079267836/1500556131264047322977310979701347*n^32 - 1815002421583732966687456944340077522505860/1500556131264047322977310979701347*n^31 + 46707656992166008024280012998674748426973920/1500556131264047322977310979701347*n^30 - 994688046921611277880524846297304554174264000/1500556131264047322977310979701347*n^29 + 17882212989807794058082991168895489735853312122/1500556131264047322977310979701347*n^28 - 275513690314636428814876130887216743376756259430/1500556131264047322977310979701347*n^27 + 3681289026594462624616542216311563978916062934400/1500556131264047322977310979701347*n^26 - 43069129032564540890454752914566377885577176106000/1500556131264047322977310979701347*n^25 + 444755340860725636090786727279514639926013062105580/1500556131264047322977310979701347*n^24 - 4081501847584844507793112234945532432018045601326100/1500556131264047322977310979701347*n^23 + 33479533903326861487089936492969793509923141810342400/1500556131264047322977310979701347*n^22 - 246659907366612752331083889292035814341396218200500000/1500556131264047322977310979701347*n^21 + 96380816679645855163648020030622807497767281244821035/88268007721414548410430057629491*n^20 - 9840375922788295501445544295229027203153763133771439125/1500556131264047322977310979701347*n^19 + 53532550282890320785696872531883570388645401076026406200/1500556131264047322977310979701347*n^18 - 264128378967123833226551253179776238436317889096513780000/1500556131264047322977310979701347*n^17 + 1183600836061753691333370916879708203352395061304646206688/1500556131264047322977310979701347*n^16 - 4828356510166522913424262470364856730277399149381728919840/1500556131264047322977310979701347*n^15 + 17999999429158103709798051142433390857458134585950426389120/1500556131264047322977310979701347*n^14 - 61630511343257176644981497874085925690619168307406157120000/1500556131264047322977310979701347*n^13 + 194590221870834903520390335364463277455628915476621229534464/1500556131264047322977310979701347*n^12 - 566243666472724488752026213675340456362620782683626128298240/1500556131264047322977310979701347*n^11 + 1506023120502374429761466360072696620529444735603665780039680/1500556131264047322977310979701347*n^10 - 3603217203679119767824555747496959570187484949197414153216000/1500556131264047322977310979701347*n^9 + 7610408762236508273180149866745289754633846892883434417594368/1500556131264047322977310979701347*n^8 - 14013218538455539413539073766746083053119477615831665519493120/1500556131264047322977310979701347*n^7 + 22674303096222237920227893509107647220387681029484853546188800/1500556131264047322977310979701347*n^6 - 33604232734084179923403302961285245938901201966488125702144000/1500556131264047322977310979701347*n^5 + 2813946257653505756045782009365194931935952111543114792960000/88268007721414548410430057629491*n^4 - 62670618239224675732120897656725175415579417584807759052800000/1500556131264047322977310979701347*n^3 + 62607649871271195201854009502392355264546903875389489152000000/1500556131264047322977310979701347*n^2 - 1940400232842869118090325898187036069432687582070702080000000/88268007721414548410430057629491*n + 4847746656870858076643516958111971672064000000000/88268007721414548410430057629491)
phi(n,47)=(1931162018869919264589983132060291/196522219993288891066082336742866246177201848320000000000) * (n - 9) * (n - 8) * (n - 7) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^37 - 2566860737810699567074145346449058587/13518134132089434852129881924422037*n^36 + 236254945627011814222256103304435517940/13518134132089434852129881924422037*n^35 - 14046027469625019939376323893493953042580/13518134132089434852129881924422037*n^34 + 86641501106760051235081217423535658616748/1931162018869919264589983132060291*n^33 - 20274893948195855157959944561029286939883676/13518134132089434852129881924422037*n^32 + 546271285481745472849346784193345278732171280/13518134132089434852129881924422037*n^31 - 12193183295098791845529526821234494127571869520/13518134132089434852129881924422037*n^30 + 230007905378340775357757624105619236468824981782/13518134132089434852129881924422037*n^29 - 3722497012190220382620789043472055599147821999242/13518134132089434852129881924422037*n^28 + 7471756676984632146729446574632363413027814512440/1931162018869919264589983132060291*n^27 - 644088007072654436915499820757849244665214755279400/13518134132089434852129881924422037*n^26 + 7007320012835331387755522457265485533880848529127380/13518134132089434852129881924422037*n^25 - 67806931306727565867177770242445107382892867176659980/13518134132089434852129881924422037*n^24 + 587008219497158386249520174369497570942332738632718000/13518134132089434852129881924422037*n^23 - 4569176044019326558329998982450715300416004931270132400/13518134132089434852129881924422037*n^22 + 4587387886447189268947291930594256214306441252716762235/1931162018869919264589983132060291*n^21 - 204420172539906739321873828508916989845453805222401568595/13518134132089434852129881924422037*n^20 + 1181395924285994861487291754940712694472197662378576693700/13518134132089434852129881924422037*n^19 - 6207041457668626219751604965864841520266418974901252005700/13518134132089434852129881924422037*n^18 + 29675945024928482607226337557211159949151125566945180145648/13518134132089434852129881924422037*n^17 - 129265435571511349049896634162545228584953456331653675636448/13518134132089434852129881924422037*n^16 + 73454969723508057877861344527391729399759683520644072234880/1931162018869919264589983132060291*n^15 - 1875017882364329210577586122636318804804222643373847104507520/13518134132089434852129881924422037*n^14 + 6298940608099240764278631226009346692950193452957184175569664/13518134132089434852129881924422037*n^13 - 19563960281242141022961299590435526524782136206321974068193024/13518134132089434852129881924422037*n^12 + 8014113804909825148769816558557106120545089268683249955138560/1931162018869919264589983132060291*n^11 - 147139584938348472228555045372983433777649406571287177364526080/13518134132089434852129881924422037*n^10 + 49604808528214626133780329827474331230927413294898963280850944/1931162018869919264589983132060291*n^9 - 723638883541589663937390018120229883368781314551910633349480448/13518134132089434852129881924422037*n^8 + 1316413517022259446933071111330148375252567824262694602274897920/13518134132089434852129881924422037*n^7 - 2110534434340662308917881715041968820977659327785991785106636800/13518134132089434852129881924422037*n^6 + 3112097097406816309361194250241480483599523096267400724742144000/13518134132089434852129881924422037*n^5 - 631013716941284485139390913359516504115935470348416696975360000/1931162018869919264589983132060291*n^4 + 822126993416775696669801987047313872555011312173801956966400000/1931162018869919264589983132060291*n^3 - 813657055041427112042416998358441663227242752369697488896000000/1931162018869919264589983132060291*n^2 + 423884974358681744067545572842717672030154472405682094080000000/1931162018869919264589983132060291*n - 541562555096144430847890037320508835364864000000000/1931162018869919264589983132060291)
phi(n,48)=(246128192884138935357187340021030213/129311620755584090321482177576805989984598816194560000000000) * (n - 9) * (n - 8) * (n - 7) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^38 - 48647347915784871085636388041150199881/246128192884138935357187340021030213*n^37 + 4664283543594024275218707068058009717998/246128192884138935357187340021030213*n^36 - 289105780818694024064617426599077692482180/246128192884138935357187340021030213*n^35 + 13025646512655796581277219645074402445666164/246128192884138935357187340021030213*n^34 - 454781070304425957311374667685363897933679068/246128192884138935357187340021030213*n^33 + 12809792330425525456306904311176765959645420464/246128192884138935357187340021030213*n^32 - 299216368424255555098511105472922434511024172600/246128192884138935357187340021030213*n^31 + 5912994451540465379899956548790260041870107999118/246128192884138935357187340021030213*n^30 - 100360849226910245782571267519569000043469437296566/246128192884138935357187340021030213*n^29 + 1480393684327928243442747990450890605208539237591308/246128192884138935357187340021030213*n^28 - 19158698225075833235348446789681748260085932188300720/246128192884138935357187340021030213*n^27 + 219249801288731586493891290386314626086462252274357420/246128192884138935357187340021030213*n^26 - 2233536136987310681597380327426717472969338143944138940/246128192884138935357187340021030213*n^25 + 20372341850729420712120609676558745967507154968173932320/246128192884138935357187340021030213*n^24 - 167218059740684399416697472461834080124530899238838850600/246128192884138935357187340021030213*n^23 + 1240561166626234879237938505826341494304610371110738907605/246128192884138935357187340021030213*n^22 - 8348520571143236854571835332707822835743165243480822757385/246128192884138935357187340021030213*n^21 + 51101678691580461382505825761543280840695299848350470573430/246128192884138935357187340021030213*n^20 - 285014909842077882184030245505870915517435396246834946037100/246128192884138935357187340021030213*n^19 + 1449911663553960789317145525596883242958492865653177692295352/246128192884138935357187340021030213*n^18 - 6732114636432252284838596820349429471417626502705021506189024/246128192884138935357187340021030213*n^17 + 28560921471886331123044805375783127623784909345907398550857792/246128192884138935357187340021030213*n^16 - 110971510054131476216740432182896488548520380309584557178613120/246128192884138935357187340021030213*n^15 + 396443202157150284673505826254546988941704818957732707167271936/246128192884138935357187340021030213*n^14 - 1308448148495374216028152653123710441459506476713773633243493632/246128192884138935357187340021030213*n^13 + 4002010335875663514560879342913796737081701588004125217060609536/246128192884138935357187340021030213*n^12 - 11317588501323915005668200332464111185956942929884409451851545600/246128192884138935357187340021030213*n^11 + 29293024219061410217435959475487156025726600528023285692599252992/246128192884138935357187340021030213*n^10 - 68224069659337781000892352483080472708547979275507613997853589504/246128192884138935357187340021030213*n^9 + 135096286492982290280745591753285866007137172427908253101293568/236889502294647675993443060655467*n^8 - 252411739419358840548955337399382695840427602653876411126138798080/246128192884138935357187340021030213*n^7 + 401179242116273860741649510902187761457073462764557508109415219200/246128192884138935357187340021030213*n^6 - 588784743085648432910197844013424306581298822398491066387398656000/246128192884138935357187340021030213*n^5 + 833300927489400849893622183774088989992348234308609625979617280000/246128192884138935357187340021030213*n^4 - 1079778476148185608759384394046710501275564254997929930208051200000/246128192884138935357187340021030213*n^3 + 1058964853738591712504045911069359525211072474618200261132288000000/246128192884138935357187340021030213*n^2 - 545679851398529330086807586417875258450394092209328242032640000000/246128192884138935357187340021030213*n + 356348161253263035497911644556894813670080512000000000/246128192884138935357187340021030213)
phi(n,49)=(338474469905974934867515124767421/928073833174048495130254862991430550128699637760000000000) * (n - 9) * (n - 8) * (n - 7) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^39 - 14537877498192309083288508733076580831/70741164210348761387310661076390989*n^38 + 1450355890402097583220201444900740282479/70741164210348761387310661076390989*n^37 - 8510043292736798870422771325707998422907/6431014928213523762482787370580999*n^36 + 4395337653483007599187365242687164578988932/70741164210348761387310661076390989*n^35 - 160062089290810051149091293180687202811460408/70741164210348761387310661076390989*n^34 + 427878003947044816700368294693967901793066612/6431014928213523762482787370580999*n^33 - 10443912502927283843299852756893854968457723196/6431014928213523762482787370580999*n^32 + 215885089947557188027846512668739458884273170194/6431014928213523762482787370580999*n^31 - 3836798248942586954292332612885830950967554275766/6431014928213523762482787370580999*n^30 + 59323490338694787169097902436014150654465942344534/6431014928213523762482787370580999*n^29 - 8861274223492885187522977493791044365813333489299422/70741164210348761387310661076390989*n^28 + 106505562400074364122216710218593195767769136750550340/70741164210348761387310661076390989*n^27 - 103683976111566283573744686982041493605755858442425340/6431014928213523762482787370580999*n^26 + 10943797920574360063966684120774639678572366684398059260/70741164210348761387310661076390989*n^25 - 94568986112575408467832892085294033273030312801728134980/70741164210348761387310661076390989*n^24 + 67202691400289982397992049838493725871025804940256752415/6431014928213523762482787370580999*n^23 - 477019069327955320528091583544557116285090077047751726485/6431014928213523762482787370580999*n^22 + 3084298643922878975262094009219717385675481781195110160165/6431014928213523762482787370580999*n^21 - 18206576496259843187031473277126242645572681142458563782595/6431014928213523762482787370580999*n^20 + 98252152630502636829732195353239840677444737869911094787696/6431014928213523762482787370580999*n^19 - 5335508917272903325634140721441906107615072418086633469592924/70741164210348761387310661076390989*n^18 + 24106909004251317651825481541472980725482669734396965433883216/70741164210348761387310661076390989*n^17 - 9071540871036325919634344722744661505839986849221888416380128/6431014928213523762482787370580999*n^16 + 379315661337633843625357782593263720740529829933141400489395968/70741164210348761387310661076390989*n^15 - 1329409314645687670536650163773209627219496615341379917659902592/70741164210348761387310661076390989*n^14 + 392348789978556604620619099158057311016339984022075688951481088/6431014928213523762482787370580999*n^13 - 1182893912022846737993825655727520990939108422804831530949672704/6431014928213523762482787370580999*n^12 + 3301611551454072984901355544744561605255192715957960091960897536/6431014928213523762482787370580999*n^11 - 8437792372327742315446195012011258457652973011255358648694907904/6431014928213523762482787370580999*n^10 + 19404855742672132927008853004994379297572647038262296747977117696/6431014928213523762482787370580999*n^9 - 433778199194964673545730330665881254532761732136103843037474848768/70741164210348761387310661076390989*n^8 + 771476048568957561054937215093616819480171160771305537558942187520/70741164210348761387310661076390989*n^7 - 110559635208616427214603197530999838584987293987741027067448524800/6431014928213523762482787370580999*n^6 + 1777083251238417132127351442545785908855670372086270323288571904000/70741164210348761387310661076390989*n^5 - 2508172047824626891453361733442687892325129189045885907548241920000/70741164210348761387310661076390989*n^4 + 293874199328880976476044312675159716423310415054779740638412800000/6431014928213523762482787370580999*n^3 - 285662759952448446029975213125158766198323173774069996716032000000/6431014928213523762482787370580999*n^2 + 7665730482139621057199764271838226866286189905169549885440000000/338474469905974934867515124767421*n - 2557522688420548101659652951365273782321152000000000/338474469905974934867515124767421)
phi(n,50)=(5257374546538092463195846857951959153/76035233004283445109031520415161922110944103922401280000000000) * (n - 9) * (n - 8) * (n - 7) * (n - 6) * (n - 5) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^40 - 1122214427558164847883650069347479954827/5257374546538092463195846857951959153*n^39 + 116366841385129574738020566228922650465175/5257374546538092463195846857951959153*n^38 - 7812152933256821925193063356395369527500745/5257374546538092463195846857951959153*n^37 + 381816929728912827982086930397371673117155948/5257374546538092463195846857951959153*n^36 - 14484718223597203047111440623802533492115199576/5257374546538092463195846857951959153*n^35 + 444074067290017569763802302602953516228542829020/5257374546538092463195846857951959153*n^34 - 11311120806186696143943756875123759043695944557940/5257374546538092463195846857951959153*n^33 + 244220058054590339581811487547822426338179139463550/5257374546538092463195846857951959153*n^32 - 4538093511700801077180237352505151487660646038607642/5257374546538092463195846857951959153*n^31 + 73437648736669111383262542408741933354234452507499330/5257374546538092463195846857951959153*n^30 - 1044778893846544442136789253934805429964171919753028990/5257374546538092463195846857951959153*n^29 + 13169027729271655181559380306325631332419833205417126724/5257374546538092463195846857951959153*n^28 - 148023369939545506112999707902853879317010787906389319940/5257374546538092463195846857951959153*n^27 + 1492062608192326182809861595642427591943822621439619136700/5257374546538092463195846857951959153*n^26 - 13554123927264869710553743430807852311354300567628453254500/5257374546538092463195846857951959153*n^25 + 111456943152113335046898549139537689465942205770714500795865/5257374546538092463195846857951959153*n^24 - 832930050915020002451526798708231405270261499926548152966995/5257374546538092463195846857951959153*n^23 + 5676089172490917022112957950580965272499089048612018069298975/5257374546538092463195846857951959153*n^22 - 35366958970611033240198556586368067018277169516640480509660225/5257374546538092463195846857951959153*n^21 + 201862551213827405231982074789625387694830922449440865603932552/5257374546538092463195846857951959153*n^20 - 1056455057958771490868826638754995152925419652472424773870699308/5257374546538092463195846857951959153*n^19 + 5071524599031646136665945054931211319916542049034930616014150000/5257374546538092463195846857951959153*n^18 - 22337661855048737451553662785239323633995345598717630512527819680/5257374546538092463195846857951959153*n^17 + 90359732531809583078478708995140985440552800774474450120028585472/5257374546538092463195846857951959153*n^16 - 336519326891035634806192077206240207993989233631583346039114909824/5257374546538092463195846857951959153*n^15 + 1158522440642045058276375546566502241297759436283854626199701914880/5257374546538092463195846857951959153*n^14 - 3703465526077390529037979162740525764328128715522280882044697212160/5257374546538092463195846857951959153*n^13 + 11015644372159338801180166061486343032487441558615433509991689308160/5257374546538092463195846857951959153*n^12 - 30365911043413738789117071358253143923057612224642318088619460533248/5257374546538092463195846857951959153*n^11 + 76668226271373799798766443185455026834437473190599148241311707320320/5257374546538092463195846857951959153*n^10 - 174186428905281109890040727347786086533276927872744369020790352117760/5257374546538092463195846857951959153*n^9 + 349807717440738621079827917742378881788599560588799450059624875032576/5257374546538092463195846857951959153*n^8 - 615599232934205972614407038723329590240877201012311440765926948208640/5257374546538092463195846857951959153*n^7 + 962936732206089612691031307475079820215181546464582974165064063385600/5257374546538092463195846857951959153*n^6 - 1401352033959751192491695806079658371302202375249890061071939534848000/5257374546538092463195846857951959153*n^5 + 1972597290001904759371734452324190219131024665665089901359152496640000/5257374546538092463195846857951959153*n^4 - 2528891056200339220514642397213688372058879920291055373867653529600000/5257374546538092463195846857951959153*n^3 + 2437049070675483160186526619698266131912190042303425264205430784000000/5257374546538092463195846857951959153*n^2 - 1229856509278723450666035090335057012643804842046704576700088320000000/5257374546538092463195846857951959153*n + 209532718816918664872772046999454150438007341056000000000/5257374546538092463195846857951959153)

## Section 5: The Nie-Ranestad-Sturmfels conjecture

We implement the right hand side of Theorem 5.2.

[7]:
#b(I) is with the convention from [NRS], bshift(I) is our convention
bDict = {():1}
def b(I):
l=len(I)
if tuple(I) in bDict.keys():
return bDict.get(tuple(I))
else:
if l==1:
i=I[0]
ans= (sum([binomial(n,j)*binomial(n+i-j-1,i-j) for j in [0..i]]))/(2^i)
elif l==2:
if I[0]==0:
ans = b([I[1]])
else:
i=I[1]
j=I[0]
ans = b([i])*b([j])-2*sum([(-1)^(k-1)*b([i+k])*b([j-k]) for k in [1..j]])
elif l%2==0:
ans=sum([(-1)^(k+1)*b([I[0],I[k]])*b(I[1:k]+I[k+1:]) for k in [1..l-1]])
else:
if I[0]==0:
ans=b(I[1:])
else:
ans=b([0]+I)
bDict[tuple(I)]=ans
return ans
def bshift(I):
return b([i+1 for i in I])
def deltaNRS(m,s):
L=[]
for w in [0..m-s]:
L=L+[list(el) for el in Partitions(w, length=s, max_slope=-1)]+[list(el)+[0] for el in Partitions(w, length=s-1, max_slope=-1)]
for el in L:
el.reverse()
return sum([(-1)^(m-s-sum(I))*psi(I)*bshift(I)*binomial(m-1,m-s-sum(I)) for I in L])

Example: we compute both sides of theorem 5.2 and indeed get the same result.

[8]:
m=6
s=2
print(deltaPoly(m,s))
print(deltaNRS(m,s))
11/72*n^6 - 9/8*n^5 + 185/72*n^4 - 25/24*n^3 - 49/18*n^2 + 13/6*n
11/72*n^6 - 9/8*n^5 + 185/72*n^4 - 25/24*n^3 - 49/18*n^2 + 13/6*n

## Section 6: General square matrices

coefd(I,J) computes the type $$A$$ Lascoux coefficient (Def 6.7), where $$I,J$$ are a strictly increasing sequences of nonnegative integers of the same length. The computation is recursive, based on the simple formula $$d_{I,J}=\det \left( \binom{i_k+j_{\ell}}{i_k} \right)_{k,\ell}$$.

[9]:
coefDictA = {():1}
def coefd(I,J):
n=len(I)
if (tuple(I),tuple(J)) in coefDictA.keys():
return coefDictA.get((tuple(I),tuple(J)))
else:
if n==1:
return binomial(I[0]+J[0],I[0])
else:
ans=sum([(-1)^(k)*coefd([I[0]],[J[k]])*coefd(I[1:],J[:k]+J[k+1:]) for k in [0..n-1]])
coefDictA[(tuple(I),tuple(J))]=ans
return ans

dPoly(I,J) is the polynomial from Theorem 6.11: $$d_{[n] \setminus I,[n] \setminus J}$$, viewed as a polynomial in $$n$$.

[10]:
#Some auxiliary functions...
R.<n> = PolynomialRing(QQ)
def summationPolynomial(f,n0):
d=f.degree()
return R.lagrange_polynomial([(i,sum([f(j) for j in [n0..i]])) for i in [n0..n0+d+1]])
def isIncreasing(L):
for i in [0..len(L)-2]:
if L[i]>=L[i+1]:
return false
return true
from itertools import product
s1 = set((0, 1))
polyDictA = {((),()):1+R.0-R.0,(tuple([0]),tuple([0])):R.0}
def dPoly(I,J):
r=len(I)
if (tuple(I),tuple(J)) in polyDictA.keys():
return polyDictA.get((tuple(I),tuple(J)))
else:
if I[0]==0 and J[0]==0:
ans = (n-r+1)*dPoly(I[1:],J[1:])-sum([dPoly(I[1:j]+[I[j]+1]+I[j+1:],J[1:]) for j in [1..r-2] if I[j+1]>I[j]+1])-dPoly(I[1:r-1]+[I[r-1]+1],J[1:])-sum([dPoly(I[1:],J[1:j]+[J[j]+1]+J[j+1:]) for j in [1..r-2] if J[j+1]>J[j]+1])-dPoly(I[1:],J[1:r-1]+[J[r-1]+1])
else:
S=set(product(set(product(s1, repeat = r)),set(product(s1, repeat = r))))
S.remove((tuple([0 for i in range(r)]),tuple([0 for i in range(r)])))
sumList = [([I[i]-el[0][i] for i in range(r)],[J[i]-el[1][i] for i in range(r)]) for el in S]
sumList = [el for el in sumList if isIncreasing(el[0]) and el[0][0]>=0 and isIncreasing(el[1]) and el[1][0]>=0]
g=sum([dPoly(el[0],el[1]) for el in sumList])
ans=summationPolynomial(g,0)(n-1)
polyDictA[(tuple(I),tuple(J))]=ans
return ans

deltaPolyA(m,s) is the codegree $$\delta_A(m,n,n-s)$$, viewed as a polynomial in $$n$$. See Theorem 6.12.

[11]:
def deltaPolyA(m,s):
ans=0
for a in [0..m-s]:
LI=[list(el) for el in IntegerVectors(a, length=s, max_slope=-1)]
for el in LI:
el.reverse()
LJ=[list(el) for el in IntegerVectors(m-s-a, length=s, max_slope=-1)]
for el in LJ:
el.reverse()
ans = ans+sum([coefd(I,J)*dPoly(I,J) for I in LI for J in LJ])
return ans

phiPolyA(d) is the type $$A$$ ML-degree $$\phi_A(n,d)$$, viewed as a polynomial in $$n$$. See Theorem 6.13.

[12]:
def phiPolyA(d):
ans=0
s=0
while s^2 <= d:
ans=ans+s*deltaPolyA(d,s)
s=s+1
return ans/n
[13]:
for d in [1..20]:
print("phi_A(n,"+str(d)+")="+str(factor(phiPolyA(d))))
phi_A(n,1)=1
phi_A(n,2)=n - 1
phi_A(n,3)=(n - 1)^2
phi_A(n,4)=(n - 1)^3
phi_A(n,5)=(11/12) * (n - 2) * (n - 1) * (n^2 - 15/11*n + 6/11)
phi_A(n,6)=(3/4) * (n - 2) * (n - 1) * (n^3 - 28/9*n^2 + 7/3*n - 2/3)
phi_A(n,7)=(11/20) * (n - 2) * (n - 1) * (n^4 - 57/11*n^3 + 271/33*n^2 - 45/11*n + 10/11)
phi_A(n,8)=(11/30) * (n - 2) * (n - 1) * (n^5 - 15/2*n^4 + 218/11*n^3 - 21*n^2 + 15/2*n - 15/11)
phi_A(n,9)=(253/1120) * (n - 2) * (n - 1) * (n^6 - 689/69*n^5 + 29099/759*n^4 - 52105/759*n^3 + 41218/759*n^2 - 3640/253*n + 560/253)
phi_A(n,10)=(395/3024) * (n - 3) * (n - 2) * (n - 1) * (n^6 - 37779/3950*n^5 + 70402/1975*n^4 - 48681/790*n^3 + 89011/1975*n^2 - 3612/395*n + 504/395)
phi_A(n,11)=(931/12960) * (n - 3) * (n - 2) * (n - 1) * (n^7 - 79398/6517*n^6 + 399352/6517*n^5 - 147984/931*n^4 + 1389307/6517*n^3 - 821658/6517*n^2 + 360/19*n - 2160/931)
phi_A(n,12)=(2869/75600) * (n - 3) * (n - 2) * (n - 1) * (n^8 - 13429/906*n^7 + 270095/2869*n^6 - 2830835/8607*n^5 + 1906701/2869*n^4 - 12656659/17214*n^3 + 1047855/2869*n^2 - 115500/2869*n + 12600/2869)
phi_A(n,13)=(386821/19958400) * (n - 3) * (n - 2) * (n - 1) * (n^9 - 356214/20359*n^8 + 51950818/386821*n^7 - 228403680/386821*n^6 + 621905869/386821*n^5 - 1042826214/386821*n^4 + 991097052/386821*n^3 - 425750280/386821*n^2 + 33818400/386821*n - 3326400/386821)
phi_A(n,14)=(57481/5987520) * (n - 3) * (n - 2) * (n - 1) * (n^10 - 11637159/574810*n^9 + 10486083/57481*n^8 - 277417563/287405*n^7 + 189778311/57481*n^6 - 4294352271/574810*n^5 + 622613249/57481*n^4 - 2617134042/287405*n^3 + 199154412/57481*n^2 - 11143440/57481*n + 997920/57481)
phi_A(n,15)=(5989/1297296) * (n - 3) * (n - 2) * (n - 1) * (n^11 - 4152751/179670*n^10 + 287350993/1197800*n^9 - 888529957/598900*n^8 + 3645825709/598900*n^7 - 207049875/11978*n^6 + 40582579377/1197800*n^5 - 78554727989/1796700*n^4 + 9954837283/299450*n^3 - 68465493/5989*n^2 + 2630628/5989*n - 216216/5989)
phi_A(n,16)=(4696271/2179457280) * (n - 3) * (n - 2) * (n - 1) * (n^12 - 122745174/4696271*n^11 + 1449349128/4696271*n^10 - 10282595238/4696271*n^9 + 245601155331/23481355*n^8 - 834296038254/23481355*n^7 + 410121843286/4696271*n^6 - 716801574630/4696271*n^5 + 4205857111644/23481355*n^4 - 2942672308056/23481355*n^3 + 186071605776/4696271*n^2 - 4782697920/4696271*n + 363242880/4696271)
phi_A(n,17)=(106324117/108972864000) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^12 - 2693775630/106324117*n^11 + 30762644815/106324117*n^10 - 211065817350/106324117*n^9 + 979558375131/106324117*n^8 - 3267596060610/106324117*n^7 + 8006378169485/106324117*n^6 - 14148761698050/106324117*n^5 + 16922872055852/106324117*n^4 - 12055785501960/106324117*n^3 + 3820403374200/106324117*n^2 - 63189126000/106324117*n + 4540536000/106324117)
phi_A(n,18)=(249016037/581188608000) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^13 - 241007626/8393799*n^12 + 92931230185/249016037*n^11 - 2183752871030/747048111*n^10 + 3870330394171/249016037*n^9 - 14930514629674/249016037*n^8 + 43360216570555/249016037*n^7 - 286360897794970/747048111*n^6 + 154722793476892/249016037*n^5 - 516101536294264/747048111*n^4 + 114956831062560/249016037*n^3 - 34271090582400/249016037*n^2 + 361224864000/249016037*n - 24216192000/249016037)
phi_A(n,19)=(4057178383/22230464256000) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^14 - 261751515289/8114356766*n^13 + 1920602215694/4057178383*n^12 - 34090580829125/8114356766*n^11 + 102902916147774/4057178383*n^10 - 904070306731527/8114356766*n^9 + 1509911780688242/4057178383*n^8 - 7854082287456575/8114356766*n^7 + 7926106250175343/4057178383*n^6 - 11959917915617342/4057178383*n^5 + 12501847418579364/4057178383*n^4 - 7909063050510000/4057178383*n^3 + 2239594338592800/4057178383*n^2 - 14743120392000/4057178383*n + 926269344000/4057178383)
phi_A(n,20)=(4026060251/53353114214400) * (n - 4) * (n - 3) * (n - 2) * (n - 1) * (n^15 - 723733658774/20130301255*n^14 + 11901998138168/20130301255*n^13 - 118887713952304/20130301255*n^12 + 161977529061930/4026060251*n^11 - 4018485892383012/20130301255*n^10 + 15196118853397844/20130301255*n^9 - 45232472582425912/20130301255*n^8 + 21517260740342387/4026060251*n^7 - 202161465401745014/20130301255*n^6 + 287192094834376188/20130301255*n^5 - 284689506500855784/20130301255*n^4 + 34350866179335072/4026060251*n^3 - 9309043318216320/4026060251*n^2 + 37606535366400/4026060251*n - 2223046425600/4026060251)

## Section 7: Skew-symmetric matrices

alpha(I) computes the type $$D$$ Lascoux coefficient (Def 7.7). The computation is done recursively, based on [LLT, A.16.3 and A.16.5].

[14]:
coefDictD = {():1}
def alpha(I):
n=len(I)
if tuple(I) in coefDictD.keys():
return coefDictD.get(tuple(I))
else:
if n%2==0:
if n==2:
ans=factorial(I[0]+I[1]-1)*(I[1]-I[0])/(factorial(I[0])*factorial(I[1]))
else:
ans=sum([(-1)^(k+1)*alpha([I[0],I[k]])*alpha(I[1:k]+I[k+1:]) for k in [1..n-1]])
else:
if I[0]>0:
ans=1
elif n==1:
ans=1
else:
ans=alpha(I[1:])
coefDictD[tuple(I)]=ans
return ans

alphaPolyEven(I) and alphaPolyOdd(I) are the polynomials $$\alpha_{[2n] \setminus I}$$ and $$\alpha_{[2n+1] \setminus I}$$ from Theorem 7.10.

[15]:
R.<n> = PolynomialRing(QQ)
def summationPolynomial(f,n0):
d=f.degree()
return R.lagrange_polynomial([(i,sum([f(j) for j in [n0..i]])) for i in [n0..n0+d+1]])
def isIncreasing(L):
for i in [0..len(L)-2]:
if L[i]>=L[i+1]:
return false
return true
from itertools import product
s1 = set((0, 1))
polyDictEven = {():1+R.0-R.0,tuple([0]):R.0-R.0}
polyDictOdd = {():1+R.0-R.0,tuple([0]):1+R.0-R.0}
def alphaPolyEven(I):
r=len(I)
if tuple(I) in polyDictEven.keys():
return polyDictEven.get(tuple(I))
else:
if I[0]==0:
if r%2==0:
ans=alphaPolyEven(I[1:])
else:
ans=R.0-R.0
else:
S=set(product(s1, repeat = r))
S.remove(tuple([0 for i in range(r)]))
sumList = [[I[i]-el[i] for i in range(r)] for el in S]
sumList = [el for el in sumList if isIncreasing(el)]
gEven=sum([alphaPolyEven(el) for el in sumList])
gOdd=sum([alphaPolyOdd(el) for el in sumList])
ans=summationPolynomial(gEven,0)(n-1)+summationPolynomial(gOdd,0)(n-1)
polyDictEven[tuple(I)]=ans
return ans
def alphaPolyOdd(I):
r=len(I)
if tuple(I) in polyDictOdd.keys():
return polyDictOdd.get(tuple(I))
else:
if I[0]==0:
if r%2==1:
ans=alphaPolyOdd(I[1:])
else:
ans=R.0-R.0
else:
S=set(product(s1, repeat = r))
S.remove(tuple([0 for i in range(r)]))
sumList = [[I[i]-el[i] for i in range(r)] for el in S]
sumList = [el for el in sumList if isIncreasing(el)]
gEven=sum([alphaPolyEven(el) for el in sumList])
gOdd=sum([alphaPolyOdd(el) for el in sumList])
ans=summationPolynomial(gEven,0)(n)+summationPolynomial(gOdd,0)(n-1)
polyDictOdd[tuple(I)]=ans
return ans

deltaPolyD(m,s) is the codegree $$\delta_D(m,n,n-s)$$, viewed as a polynomial in $$n$$. See Theorem 7.11.

[16]:
def deltaPolyD(m,s):
L=[list(el) for el in IntegerVectors(m, length=2*s, max_slope=-1)]
for el in L:
el.reverse()
return sum([alpha(I)*alphaPolyEven(I) for I in L])

phiPolyD(d) is the type $$D$$ ML-degree $$\phi_D(n,d)$$, viewed as a polynomial in $$n$$. See Theorem 7.12.

[17]:
def phiPolyD(d):
ans =0
s=1
while binomial(s,2) <= d:
ans=ans+s*deltaPolyD(d,s)
s=s+1
return ans/n
[18]:
for d in [1..20]:
print("phi_D(n,"+str(d)+")="+str(factor(phiPolyD(d))))
phi_D(n,1)=1
phi_D(n,2)=n - 1
phi_D(n,3)=(n - 1)^2
phi_D(n,4)=(n - 1)^3
phi_D(n,5)=(n - 1)^4
phi_D(n,6)=(n - 1)^5
phi_D(n,7)=(44/45) * (n - 2) * (n - 1) * (n^4 - 69/22*n^3 + 697/176*n^2 - 405/176*n + 45/88)
phi_D(n,8)=(41/45) * (n - 2) * (n - 1) * (n^5 - 185/41*n^4 + 313/41*n^3 - 1099/164*n^2 + 495/164*n - 45/82)
phi_D(n,9)=(251/315) * (n - 2) * (n - 1) * (n^6 - 1543/251*n^5 + 3570/251*n^4 - 4124/251*n^3 + 11083/1004*n^2 - 4095/1004*n + 315/502)
phi_D(n,10)=(41/63) * (n - 2) * (n - 1) * (n^7 - 1644/205*n^6 + 2045/82*n^5 - 15879/410*n^4 + 27591/820*n^3 - 1497/82*n^2 + 945/164*n - 63/82)
phi_D(n,11)=(2348/4725) * (n - 2) * (n - 1) * (n^8 - 11853/1174*n^7 + 383849/9392*n^6 - 798705/9392*n^5 + 462769/4696*n^4 - 317763/4696*n^3 + 287991/9392*n^2 - 80325/9392*n + 4725/4696)
phi_D(n,12)=(187/525) * (n - 2) * (n - 1) * (n^9 - 1889/153*n^8 + 2141/34*n^7 - 104579/612*n^6 + 99481/374*n^5 - 1634509/6732*n^4 + 101153/748*n^3 - 9786/187*n^2 + 9975/748*n - 525/374)
phi_D(n,13)=(112702/467775) * (n - 2) * (n - 1) * (n^10 - 830649/56351*n^9 + 20749233/225404*n^8 - 71130729/225404*n^7 + 1160808447/1803232*n^6 - 1433630787/1803232*n^5 + 1061893691/1803232*n^4 - 484241193/1803232*n^3 + 81158643/901616*n^2 - 9823275/450808*n + 467775/225404)
phi_D(n,14)=(10336/66825) * (n - 2) * (n - 1) * (n^11 - 624035/36176*n^10 + 18630609/144704*n^9 - 39186291/72352*n^8 + 95438277/68096*n^7 - 661510611/289408*n^6 + 671246237/289408*n^5 - 48159371/34048*n^4 + 86655537/165376*n^3 - 88642773/578816*n^2 + 1536975/41344*n - 66825/20672)
phi_D(n,15)=(4034917/42567525) * (n - 2) * (n - 1) * (n^12 - 80071697/4034917*n^11 + 2799507613/16139668*n^10 - 14097428997/16139668*n^9 + 179598937485/64558672*n^8 - 373648069683/64558672*n^7 + 1012077753919/129117344*n^6 - 862145250719/129117344*n^5 + 433772320261/129117344*n^4 - 126095928615/129117344*n^3 + 15980166711/64558672*n^2 - 1064188125/16139668*n + 42567525/8069834)
phi_D(n,16)=(35610688/638512875) * (n - 3) * (n - 2) * (n - 1) * (n^12 - 694192197/35610688*n^11 + 23901030245/142442752*n^10 - 118569193575/142442752*n^9 + 1484854242819/569771008*n^8 - 3018952611171/569771008*n^7 + 15786689716895/2279084032*n^6 - 3157730625975/569771008*n^5 + 5556567116917/2279084032*n^4 - 288139774377/569771008*n^3 + 57355790265/569771008*n^2 - 5604724125/142442752*n + 212837625/71221376)
phi_D(n,17)=(2889814/91216125) * (n - 3) * (n - 2) * (n - 1) * (n^13 - 224199410/10114349*n^12 + 2548763309/11559256*n^11 - 52173082855/40457396*n^10 + 1579817692749/323659168*n^9 - 2006638122585/161829584*n^8 + 3919937538647/184948096*n^7 - 15343207969165/647318336*n^6 + 2983925818351/184948096*n^5 - 3645847390595/647318336*n^4 + 378839195619/647318336*n^3 - 16178719365/323659168*n^2 + 861485625/11559256*n - 30405375/5779628)
phi_D(n,18)=(1593334/91216125) * (n - 3) * (n - 2) * (n - 1) * (n^14 - 19783417/796667*n^13 + 12517790823/44613352*n^12 - 84570381313/44613352*n^11 + 1510057991219/178453408*n^10 - 4644803114379/178453408*n^9 + 39826628868479/713813632*n^8 - 8390750702737/101973376*n^7 + 57123843775707/713813632*n^6 - 33202288954727/713813632*n^5 + 4336774634939/356906816*n^4 + 204916815021/356906816*n^3 - 69177403935/178453408*n^2 - 922296375/6373336*n + 30405375/3186668)
phi_D(n,19)=(70598966/7514805375) * (n - 3) * (n - 2) * (n - 1) * (n^15 - 12604786752/458893279*n^14 + 1275231310361/3671146232*n^13 - 1222744706919/458893279*n^12 + 100894998432115/7342292464*n^11 - 366339396245361/7342292464*n^10 + 3811754721385079/29369169856*n^9 - 7083201293655693/29369169856*n^8 + 353192789749447/1129583456*n^7 - 253454858324523/947392576*n^6 + 972056475146177/7342292464*n^5 - 41160578659851/1835573116*n^4 - 232794841103613/29369169856*n^3 + 35125915859955/14684584928*n^2 + 80992902375/282395864*n - 2504935125/141197932)
phi_D(n,20)=(96729289/19538493975) * (n - 3) * (n - 2) * (n - 1) * (n^16 - 14536065932/483646445*n^15 + 203150558858/483646445*n^14 - 6973053513803/1934585780*n^13 + 40828204101053/1934585780*n^12 - 342706837542721/3869171560*n^11 + 4214824056050393/15476686240*n^10 - 9530368673679347/15476686240*n^9 + 7828555259731591/7738343120*n^8 - 3619205610243415/3095337248*n^7 + 13729499337789461/15476686240*n^6 - 5722719409170179/15476686240*n^5 + 184700841652077/7738343120*n^4 + 639722999030733/15476686240*n^3 - 15792671183931/1547668624*n^2 - 223607208825/386917156*n + 6512831325/193458578)

References:

• LLT: D. Laksov, A. Lascoux, and A. Thorup. On Giambelli’s theorem on complete correlations. Acta Math., 162(3-4):143–199, 1989.

• NRS: J. Nie, K. Ranestad, and B. Sturmfels. The algebraic degree of semidefinite programming. Math. Program., 122(2, Ser. A):379–405, 2010.

• MMW: M. Michalek, L. Monin, and J. Wiśniewski. Maximum likelihood degree and space of orbits of a C∗ action. arXiv preprint arXiv:2004.07735, 2020.

• SU: B. Sturmfels and C. Uhler. Multivariate Gaussian, semidefinite matrix completion, and convex algebraic geometry. Ann. Inst. Statist. Math., 62(4):603–638, 2010.