with(combinat): #Created, June, 2014 #Previous version: July 9, 2015 #This version: Oct. 20, 2015 #----------------------- Help ----------------------- with(linalg): with(combinat): print(`Version of Oct. 6, 2015 `): print(`This is Sn, a Maple package accompanying the articles`): print(`Identities in Character Tables of S_n by Alon Regev, Amitai Regev, and Doron Zeilberger `): print(`and also the article `): print(`Surprising Relations Between Sums-Of-Squares of Character of Sn Over Two-Rowed Shapes and Over Hook Shapes `): print(`By Amitai Regev and Doron Zeilberger `): print(``): print(`Please send all bugs to zeilberg@math.rutgers.edu`): print(`----------------------------------------------------------------------------`): print(`For a list of the Ratio procedures, type ezraY();`): print(`For help with a specific procdure type ezra(Procedure_Name);`): print(`----------------------------------------------------------------------------`): print(`----------------------------------------------------------------------------`): print(`For a list of the Checkling procedures, type ezraC();`): print(`For help with a specific procdure type ezra(Procedure_Name);`): print(`----------------------------------------------------------------------------`): print(`----------------------------------------------------------------------------`): print(`For a list of the procedures from FindRec type ezraFind();`): print(`For help with a specific procdure type ezraFind(Procedure_Name);`): print(`----------------------------------------------------------------------------`): print(`----------------------------------------------------------------------------`): print(`For a list of the supporting procedures, type ezra1();`): print(`For help with a specific procdure type ezra(Procedure_Name);`): print(`----------------------------------------------------------------------------`): print(`----------------------------------------------------------------------------`): print(`For a list of the Story procedures, type ezraS();`): print(`For help with a specific procdure type ezra(Procedure_Name);`): print(`----------------------------------------------------------------------------`): print(`----------------------------------------------------------------------------`): print(`For a list of the MAIN procedures, type ezra();`): print(`For help with a specific procdure type ezra(Procedure_Name);`): print(`----------------------------------------------------------------------------`): ezraY:=proc(): if nargs=0 then print(` the ratio procedures are: CheckN1, CheckN2, NisimC, NisimC1, Par2, SeferNisim, Yakhas `): else ezra(args): fi: end: ezraS:=proc(): if nargs=0 then print(` the Story procedures are: PsiRecV, MamarPhi, MamarPsi, MamarRec, Phi2V, Psi2V `): else ezra(args): fi: end: ezraC:=proc(): if nargs=0 then print(` the Checking procedures are: CheckAmitai, CheckCFmu2, CheckCFmu3, CheckCFmu4, `): print(` checkLemma1, CheckGoingDown, CheckGoingUp,`): else ezra(args): fi: end: ezraOld:=proc(): if nargs=0 then print(` the Old procedures are: ChaTab, ChaTabPC, ChaTabPCv, ChaTabPCvAll, ChaTabS, `): else ezra(args): fi: end: ezra1:=proc(): if nargs=0 then print(` the supporing procedures are: AlonR, CFmu2Rows, CFmu2RowsGF, PsiRec1, Phi, Amitai, CFmuHookOperF,C71, chiMLhook, chiMLpc, Coe, CFmuHookGF, Conj, `): print(` EtoM, e_lambda, GoingDown, GoingUp, GoingUpRat, GuessPol, GuessRat, h_lambda, Horim, HtoM, ID, ID1, IsPar, K71, m_lambda, `): print(` MtoE, MtoH, MtoP , NYT, `): print(` p_lambda, PARnk, Partition, ParToF, psiMu1, PtoM, RevMM, sToM, , SofS, SofS1, PtoM, SofS, Symm, Van, Yeladim `): else ezra(args): fi: end: ezra:=proc(): if nargs=0 then print(` Welcome to , a SnCharacterTableMiracles, apackage written`): print(``): print(`Contains the following procedures: AlexMiller, CheckAlexMiller, `): print(`chiML , CFmu, CFmuR, CFSmu, CFmuHook, CFmuHookOper, Kulam, KulamSeq, Phi2, PhiSeq, , Psi2, PsiRec,`): print(` PsiSeq `): elif nargs=1 then if args[1]=AlexMiller then print(`AlexMiller(n): The list of lists of partial sums of the rows of the character tables. Try:`): print(`AlexMiller(5);`): elif args[1]=CheckAlexMiller then print(`CheckAlexMiller(n): Checks Alexander Rossi Miller's conjecture for n. Try`): print(`CheckAlexMiller(5);`): elif args[1]=CheckN1 then print(`CheckN1(k): checks Conjecture 1 that [2*k+1] and [2*k+1,2] are equivalent`): elif args[1]=CheckN2 then print(`CheckN2(k): checks Conjecture 2 that [2*k+1,3] and [2*k+1,3,2] are equivalent`): elif args[1]=Kulam then print(` Kulam(Mu,n,pow): The sum of the pow-th power of all chiML(M,L) where M is Mu with n-|Mu| 1's appended, and L range over`): print(`all shapes with n cells. Try:`): print(`Kulam([],10,2);`): elif args[1]=KulamSeq then print(`KulamSeq(Mu,pow,N0): The sequence of the sum of the pow-th power of all chiML(M,L) where M is Mu with n-|Mu| 1's appended, and L range over`): print(`all shapes with n cells for n from |Mu0| to |Mu0|+N0`): print(`KulamSeq([],2,20);`): elif args[1]=PSI then print(`PSI(Mu,k,p,N0): The sum of ChiRL([Mu,1$(N0-|Mu|)],lambda)^p over all shapes lambda with <=k rows with N0 cells. Try:`): print(`PSI([2],2,2,9);`): elif args[1]=PHI then print(`PHI(Mu,p,N0): The sum of ChiRL([Mu,1$(N0-|Mu|)],[k,1$(N0-k)])^p over all `): print(`k from 1 to N0`): print(`PHI([2],2,9); `): elif args[1]=PhiSeq then print(`PhiSeq(Mu,p,N0): The sequence "sum of ChiRL([Mu,1$(N-|Mu|)],[k,1$(n-k)])^p over all `): print(`k from 1 to N", for N from 1 to N0. Try:`): print(`PhiSeq([2],2,20); `): elif args[1]=PsiRec then print(`PsiRec(Mu,k,pow,n,N,COMP): Finds a recurrence operator of Degree+ORDER<=COMP, ope(n,N), annihilating`): print(`PsiSeq(Mu,k,pow), or returns FAIL. Try:`): print(`PsiRec([2],2,2,n,N,10);`): elif args[1]=PsiRecV then print(`PsiRecV(Mu,k,pow,n,N,COMP,A,i): Verbose version of PsiRec(Mu,k,pow,n,N,COMP) (q.v.). Try.`): print(`PsiRecV([2],2,2,n,N,10,A,1);`): elif args[1]=PsiRec1 then print(`PsiRec1(Mu,k,pow,n,N,DEG): Finds a recurrence operator of the first order and degree<=DEG, ope(n,N), annihilating`): print(`PsiSeq(Mu,k,pow), or returns FAIL. Try:`): print(`PsiRec1([2],2,2,n,N,10);`): elif args[1]=PsiSeq then print(`PsiSeq(Mu,k,pow,N0): The first N0 terms, starting with the sum of Mu, for the`): print(`sequence of the sum of ChiRL([Mu,1$(n-|Mu|)],lambda)^p over all shapes lambda with <=k rows with n cells. Try:`): print(`PsiSeq([2],2,2,9);`): elif args[1]=Amitai then print(`Amitai(mu): The conjectured explicit expression for SofS1(R)`): print(`Try: `): print(`Amitai([4,4,2]);`): elif args[1]=C71 then print(`C71(N): the sequence sum(chiML([2,1$(n-2)],[n-j,j])^2,j=0..n/2) from n=3 to n=N. Try:`): print(`C71(30); `): elif args[1]=CFmu then print(` CFmu(Mu,L,MC): The closed-form expression for ChiRL([Mu,1^(n-|Mu|)],L), where L is a (symbolic) shape of a fixed length (nops(L)). `): print(`MC is the symbol for the multinomial coefficient. `): print(` Try: `): print(` CFmu([2],[a,b],MC); `): elif args[1]=CFmu2Rows then print(`CFmu2Rows(Mu,n,j): The closed-form expression for ChiRL([Mu,1^(n-|Mu|)],[n-j,j]). Try:`): print(`CFmu2Rows([2,2],n,j);`): elif args[1]=CFmu2RowsGF then print(`CFmu2RowsGF(Mu,t): The polynomial multipliying (1-x)*(1+x)^(n-|Mu0|) to produce the generating function whose coefficient of t^j is`): print(`CFmu2Rows([2,2],n,j). Try: CFmu2RowsGF([3],t);`): elif args[1]=CFmuHook then print(`CFmuHook(Mu,n,k): a closed-form expression for chiML([Mu,1$(n-|Mu|)],[k,1$(n-k])`): print(`for n>=k>=|Mu|. Try: `): print(`CFmuHook([2],n,k);`): elif args[1]=CFmuHookGF then print(`CFmuHookGF(Mu,n,x): The generating function whose coefficient of x^k is chiML([Mu,1$(n-|Mu|)],[k,1$(n-k])) `): print(`for n>=k>=|Mu|. n can be numeric or symbolic. Try:`): print(`CFmuHookGF([2],n,x);`): elif args[1]=CFmuHookOper then print(`CFmuHookOper(Mu,K): The recurrrence operator, in the shift operator, K, (the NEGATIVE shift operator in k) `): print(`such that applying it to binomial(n-1-|Mu|,k-1) `): print(`gives a closed-form expression for chiML([Mu,1$(n-|Mu|)],[k,1$(n-k])`): print(`for n>=k>=|Mu|. Try: `): print(`CFmuHookOper([2],K);`): elif args[1]=CFmuHookOperF then print(`CFmuHookOper(Mu,K): The recurrrence operator, in the shift operator, K, (the NEGATIVE shift operator in k) `): print(`such that applying it to binomial(n-1-|Mu|,k-1) `): print(`gives a closed-form expression for chiML([Mu,1$(n-|Mu|)],[k,1$(n-k])`): print(`for n>=k>=|Mu|. It is done fast. Try: `): print(`CFmuHookOperF([2],K);`): elif args[1]=CFmuR then print(` CFmuR(Mu,L): The closed-form expression for ChiRL([Mu,1^(n-|Mu|)],L), where L is a (symbolic) shape of a fixed length (nops(L)). `): print(`as a rational function times the multinomial coefficient`): print(` Try: `): print(` CFmuR([2],[a,b],MC); `): elif args[1]=CFSmu then print(` CFSmu(Mu,L): The closed-form expression for ChiRL([Mu,1^(n-|Mu|)],L), where L is a (symbolic) shape of a fixed length (nops(L)).`): print(`But expressed as shifts of the multinomial coefficient. `): print(` Try: `): print(` CFSmu([2],[a,b]); `): elif args[1]=CheckLemma1 then print(`CheckLemma1(tau): checks empirically that the coeff. of x[n] in Van([x[1], ..., x[n]])*p_tau(x[1], ..., x[n])*(1/x[1]+...+1/x[n])`): print(`when the smallest part of tau is >=2 is always 0, try:`): print(`CheckLemma1([2,2,2]); `): elif args[1]=ChaTab then print(`ChaTab(n): the character table of S_n `): print(`Try:`): print(`ChaTab(3);`): elif args[1]=ChaTabPC then print(`ChaTabPC(n): the character table of S_n, using pre-comupted data`): print(`it inputs a pos. integer n, and outputs the list of partitions of n, in rev. lex. order,`): print(`followed by the p(n) by p(n) character tables, following that order. Try:`): print(`ChaTabPC(3);`): elif args[1]=ChaTabPCv then print(`ChaTabPCv(n): Inputes a pos. integer <=9. The Verbose form of the character table of S_n, using pre-comupted data. Try:`): print(`ChaTabPCv(9);`): elif args[1]=ChaTabPCvAll then print(`ChaTabPCvAll(n): Inputes a pos. integer <=9. The Verbose form of the character tables of S_N, for N<=9, using pre-comupted data. Try:`): print(`ChaTabPCvAll(9);`): elif args[1]=ChaTabS then print(`ChaTabS(n): the character table of S_n done slowly.`): print(`Try:`): print(`ChaTabS(3);`): elif args[1]=CheckCFmu2 then print(`CheckCFmu2(Mu,N): checks CFmu for Mu and two-rowed shapes with largest parts<=N. N must be at leastt |Mu|. Try:`): print(`CheckCFmu2([2,1],10);`): elif args[1]=CheckCFmu3 then print(`CheckCFmu3(Mu,N): checks CFmu for Mu and three-rowed shapes with largest parts<=N. Try:`): print(`CheckCFmu3([3,2,2],10);`): elif args[1]=CheckAmitai then print(`CheckAmitai(n): checks the conjecture for all partitions of integers up to n. Try:`): print(`CheckAmitai(10);`): elif args[1]=CheckGoingDown then print(`CheckGoingDown(n): Checks the Going Down Recurrence for all partitions of n that end with 1`): print(`It is only fast for n<=9 (since it uses precomputed values)`): print(`Try:`); print(`CheckGoingDown(5);`): elif args[1]=CheckGoingUp then print(`CheckGoingUp(n): Checks the Going Up Recurrence for all partitions of n`): print(`It is only fast for n<=8 (since it uses precomputed values)`): print(`Try:`); print(`CheckGoingUp(5);`): elif args[1]=chiML then print(`chiML(R,L): inputs two partitions of the same integer and outputs `): print(`the value of the Symmetric Group character R at the patition L.`): print(`for partitions of <=9 it is very fast, since it it uses pre-computed values given in Data9();`): print(`For partitions of larger integers it is VERY slow. Don't even try!`): print(`chiML([3],[2,1]); `): elif args[1]=chiMLhook then print(`chiMLhook(R,L): the value of chi_R^L, and when L is a hook [k,1$(n-k)]`): print(`chiMLhook([1,1,1,1,1,1],[2,1,1,1,1]); `): elif args[1]=chiMLm then print(`chiMLm(R,L): inputs two partitions of the same integer and outputs `): print(`the value of the Symmetric Group character R at the patition L.`): print(`It uses Maple's combinat[Chi] adapted to our convention. Try: `): print(`chiMLm([3],[2,1]); `): elif args[1]=chiMLdir then print(`chiMLdir(R,L): the value of chi_R^L, Done directly. VERY slow for large n. Try:`): print(`chiMLdir([3],[2,1]); `): elif args[1]=chiMLdirT then print(`chiMLdirT(R,L): the value of chi_R^L, Done directly. and TRUNCATED. Try:`): print(`chiMLdirT([3],[2,1]); `): elif args[1]=chiMLdirG then print(`chiMLdirG(R,L,n): the Generalized chi_R^L, where R and L are partitions of the same integer m, that is <=n. Try:`): print(`chiMLdirG([3],[2,1],3); `): elif args[1]=chiMLpc then print(`chiMLpc(R,L): the value of chi_R^L, using pre-computed data. So far, we can only do partitions for n<=9. Try`): print(`chiMLpc([3],[2,1]); `): elif args[1]=Coe then print(`Coe(F,var,L): the coefficient of mul(var[i]^L[i] ,i=1..nops(L)) in F`): print(`Try: `): print(` Coe((x1+x2+x2)^5,[x1,x2,x2],[2,2,1]); `): elif args[1]=Conj then print(` Conj(lam): computes the conjugate of the partition lam`): print( ` For example, try: Conj([5,3,1]); `): elif args[1]=Data9 then print(`Data9() , the list of lists of lists (length 9), whose i-th item is the character table for S_i `): print(`Do: Data9();`): elif args[1]=e_lambda then print(`e_lambda(lambda,x,m): The elementary symmetric function in`): print(` x[1], ..., x[m], corresponding to the partition lambda`): print(`E.g. try: e_lambda([1,1,1],x,3); `); elif args[1]=EtoM then print(`EtoM(n): The transition matrix from the e-basis`): print(`to the m-basis for homog. symm. pol. of deg. n `): elif args[1]=GoingDown then print(` GoingDown(M,L): chiML(M,L)-Sum(ChiRK(M',L') over all the children L' of L and M' is M with the last part reduced by 1 `): print(` Try: `): print(` GoingDown([1,1,1,1],[2,2]); `): elif args[1]=GoingUp then print(` GoingUp(M,L): (n+1)*chiML(M,L)-Sum(ChiRK(M',L') over all the parents L' of L and M' is M with 1 appended at the end `): print(` Try: `): print(` GoingUp([1,1,1,1],[2,2]); `): elif args[1]=GoingUpRat then print(` GoingUpRat(M,L): Sum(ChiRK(M',L')/chiML(M,L) over all the parents L' of L and M' is M with 1 appended at the end `): print(` Try: `): print(` GoingUpRat([1,1,1,1],[2,2]); `): elif nops([args])=1 and op(1,[args])=GuessPol then print(`GuessPol(L,n,s0): guesses a polynomial of degree d in n for `): print(` the list L, such that L[i]=P[i] for i>=s0 for example, try: `): print(` GuessPol([(seq(i,i=1..10),n,1); `): elif nops([args])=1 and op(1,[args])=GuessRat then print(`GuessRat(L,n,s0): guesses a rational function of degree d in n for `): print(` the list L, such that L[i]=P[i] for i>=s0 for example, try: `): print(` GuessRat([seq(i/(2+i),i=1..10)],n,1); `): elif args[1]=ID then print(` ID(L): The ID of a partition L, try: ID([1,1,1,1]); `): elif args[1]=ID1 then print(` ID1(L): The ID1 of a partition L, according to Maple. try: ID1([1,1,1,1]); `): elif args[1]=K71 then print(`K71(a,b): Inputs positive integers a and b such that a>=b>=0 and outputs chiML([2,1^(a+b-2)],[a,b]); `): print(`Try: `): print(`K71(5,3);`): elif args[1]=MamarPhi then print(`MamarPhi(K,n,F): inputs a positive integer K and outputs an a article with explicit formulas for the`): print(`sum of the squares of the character of the symmetric group S_n over all hook shapes with n cells,`): print(`where mu is some fixed partition,Mu, and the rest are ones, for all Mu partions of K whose smallest part is at least 2.`): print(`n and F are symbols,.`): print(` Try: `): print(` MamarPhi(4,n,F); `): elif args[1]=MamarPsi then print(`MamarPsi(K,n,N0,F): inputs a positive integer K and outputs an a article with explicit formulas for the`): print(`sum of the squares of the character of the symmetric group S_n over all two-rowed shapes`): print(`where mu is some fixed partition,Mu, and the rest are ones, for all Mu partions of K whose smallest part is at least 2.`): print(`n and F are symbols, N0 is a positive integer for data collection. For small K, N0 is good enough.`): print(` Try: `): print(` MamarPsi(4,n,30,F); `): elif args[1]=MamarRec then print(`MamarRec(K,k,pow,n,COMP,A): inputs a positive integer K, a small positive integer k,`): print(` and outputs an a article with explicit linear recurrences with polynomial coefficients of`): print(`sum of the pow-th power of the character of the symmetric group S_n over all hook shapes with n cells and k rows`): print(`where mu is some fixed partition,Mu, and the rest are ones, for all Mu partions of K whose smallest part is at least 2.`): print(`over all partitions Mu of K with smallest part at least 2.`): print(`n and A are symbols, COMP is a positive integer upping the ORDER+DEGREE of the desired recurrence. `): print(`Try: `): print(` MamarRec(4,2,2,n,10,A); `): elif args[1]=MtoE then print(`MtoE(n): The transition matrix from the m-basis`): print(`to the e-basis for homog. symm. pol. of deg. n `): elif args[1]=MtoH then print(`MtoH(n): The transition matrix from the m-basis`): print(`to the h-basis for homog. symm. pol. of deg. n `): elif args[1]=MtoP then print(`MtoP(n): The transition matrix from the m-basis`): print(`to the p-basis for homog. symm. pol. of deg. n `): elif args[1]=NisimC then print(`NisimC(K,L,N0): inputs a positive integer K, a postive integer L, and a fairly large positive integer N0`): print(` outputs the set of pairs [[mu1,mu2,r],ratio] such that ratio:=Yakhas(mu1,mu2,n,r,N0) is a constant, where `): print(` mu1,mu2 are partitions with smallest part>=2 of an integer <=K, and abs(r)<=L. For example, try: `): print(` NisimC(5,2,30); `): elif args[1]=NisimC1 then print(`NisimC1(K,N0): inputs a positive integer K, and a fairly large positive integer N0`): print(`outputs the set of pairs [[mu1,mu2],ratio] such that ratio:=Yakhas(mu1,mu2,2,n,N0) is a constant, where`): print(`mu1 is partition of K and mu2 a partition of K+2 with smallest parts>=2 `): print(` NisimC1(5,30); `): elif args[1]=NYT then print(`NYT(L): The number of Young Tableaux using a new recurrence`): print(`Try: NYT([3,3,3]);`): elif args[1]=Par2 then print(` Par2(n): the set of partitions of n whose smallest part is >=2. Try: `): print(` Par2(10); `): elif args[1]=Phi2 then print(`Phi2(Mu,n): Finds an explicit expression for `): print(`The sum of chiML([Mu,1$(n-|Mu|)^2],[k,1$(n-k)]) over all hook shapes`): print(` with two rows n starting`): print(`at |Mu|. Try:`): print(`Phi2([2],n);`): elif args[1]=Phi2V then print(`Phi2V(Mu,n,i,F): Verbose version of Phi2(Mu,n) (q.v), stating it as theorem Number i. Try:`): print(`Phi2V([2],n,1,F);`): elif args[1]=Psi2 then print(`Psi2(Mu,n,N0): Finds an explicit expression for `): print(`The sum of chiML([Mu,1$(n-|Mu|)^2],[n-k,k]) over all shapes with two rows for k<=n/2 valid for n starting`): print(`at |Mu|. Uses N0 data points. Try:`): print(`Psi2([2],n,30);`): elif args[1]=Psi2V then print(`Psi2V(Mu,n,N0,i,F): Verbose version of Psi2(Mu,n,N0) (q.v), stating it as theorem Number i. Try:`): print(`Psi2V([2],n,30,1,F);`): elif args[1]=PtoM then print(`PtoM(n): The transition matrix from the p-basis`): print(`to the m-basis for homog. symm. pol. of deg. n `): elif args[1]=Horim then print(` Horim(L): all the children of L, try: `): print(` Horim([3,2,2]); `): elif args[1]=HtoM then print(`HtoM(n): The transition matrix from the h-basis`): print(`to the m-basis for homog. symm. pol. of deg. n `): elif args[1]=h_lambda then print(`h_lambda(lambda,x,m): The complete homog. symmetric function in`): print(` x[1], ..., x[m], corresponding to the partition lambda`): print(`E.g. try: h_lambda([1,1,1],x,3); `); elif args[1]=IsPar then print(` IsPar(lam): returns true iff lam is a genuine partition`): print(` in weakly decreasing form `): print( ` For example, try: IsPar([5,3,1]); `): print( ` and try : IsPar([5,3,1,4]); `): elif args[1]=m_lambda then print(`m_lambda(lambda,x,m): The monomial symmetric function in`): print(` x[1], ..., x[m], corresponding to the partition lambda`): print(`E.g. try: m_lambda([1,1,1],x,3); `); elif args[1]=ParToF then print(`ParToF(P): translates a partition to frequency notation, try:`): print(`ParToF([3,3,3,2,2]);`): elif args[1]=Partition then print(`Partition(n): The list of all partitions of a positive `): print(` integer n, i n rev. lex. order`): elif args[1]=PARnk then print(`PARnk(n,k): the set of partitions of n into at most k parts. Try:`): print(`PARnk(10,3);`): elif args[1]=p_lambda then print(`p_lambda(lambda,x,m): The power-sum symmetric function in`): print(` x[1], ..., x[m], corresponding to the partition lambda`): print(`E.g. try: p_lambda([1,1,1],x,3); `); elif args[1]=psiMu1 then print(` psiMu1(Mu,a,b0,K): inputs a partition Mu, a symbol a, an integer b0, and a fairly large positive integer K, `): print(` outputs a polynomial expression, by using K values of a `): print(` in a, for chiML([Mu,1$(a+b0-|Mu])],[a,b0]), valid for a0>=max(|Mu|,b0). Try: `): print(` psiMu1([3],a,2,30); `): elif args[1]=RevMM then print(`RevMM(List): reverses the list List, e.g. RevMM([3,5]); `): print(` should give [5,3]`): elif args[1]=SeferNisim then print(`SeferNisim(K,N0): all the pairs [mu1,mu2,const] with |mu1|<=K, |mu2|=|mu1|+2 such that`): print(`Psi2(mu1,n,N)/subs(n=n+r,Phi2(mu2,n)) is const. Try:`): print(`SeferSisim(6,40);`): elif args[1]=sLam then print(`sLam(L,x): The Schur funcion s_L`): print(`Try:`): print(`sLam([2,2,1],x);`): elif args[1]=SofS then print(`SofS(n): inputs a positive integer n and outputs the list of size p(n) whose`): print(`i-th item is the sum of squares of the character table of S_n for`): print(`the i-th partition.Try:`): print(`SofS(5);`): elif args[1]=SofS1 then print(` SofS1(R): inputs an integer partition R, of n, say and outputs `): print(` sum(chiML(R,L)^2, L in Partion(n)); `): print(` Try: `): print(` SofS1([3,2]); `): elif args[1]=SPtoM then print(`SPtoM(P,x,n,m): converts a symmetric polynomial in the x's`): print(`to the m's `): print(`For example, try; SPtoM(x[1]+x[2],x,2,m)`): elif args[1]=sToM then print(`sToM(n): The Schur to M Matrix, try: `): print(`sToM(4); `): elif args[1]=Symm then print(`Symm(f,x,n): The symmetrizer of the function (or expression) `): print(` f(x[1], ..., x[n]) `): print(` For example, try Symm(x[1]+x[2]^2,x,3); ` ) : elif args[1]=Van then print(`Van(L): The Vandermonde product in the list of variales L`): print(` For example, try Van([x1,x2,x3]); ` ) : elif args[1]=Yakhas then print(`Yakhas(mu1,mu2,n,r): inputs partitions mu1,mu2, a symbol n, and a (small) integer n, outputs`): print(`Psi2(mu1,n,N)/subs(n=n+r,Phi2(mu2,n)). For example, try:`): print(`Yakhas([3],[3,2],n,2,30); `): elif args[1]=Yeladim then print(` Yeladim(L): all the children of L, try: `): print(` Yeladim([3,2,2]); `): else print(`There is no help for `, args[1]): fi: fi: end: #help ##start from Findrec ezraFind:=proc() if args=NULL then print(` FindRec: A Maple package for empirically guessing partial recurrence`): print(`equations satisfied by Discrete Functions of TWO Variables`): print(): print(`For help with a specific procedure, type "ezra(procedure_name);"`): print(`Contains procedures: `): print(` findrec, Findrec, FindrecF`): print(): elif nargs=1 and args[1]=findrec then print(`findrec(f,DEGREE,ORDER,n,N): guesses a recurrence operator annihilating`): print(`the sequence f of degree DEGREE and order ORDER.`): print(`For example, try: findrec([seq(i,i=1..10)],0,2,n,N);`): elif nargs=1 and args[1]=Findrec then print(`Findrec(f,n,N,MaxC): Given a list f tries to find a linear recurrence equation with`): print(`poly coffs. ope(n,N), where n is the discrete variable, and N is the shift operator `): print(`of maximum DEGREE+ORDER<=MaxC`): print(`e.g. try Findrec([1,1,2,3,5,8,13,21,34,55,89],n,N,2);`): elif nargs=1 and args[1]=FindrecF then print(`FindrecF(f,n,N): Given a function f of a single variable tries to find a linear recurrence equation with`): print(`poly coffs. .g. try FindrecF(i->i!,n,N);`): elif nargs=1 and args[1]=SeqFromRec then print(`SeqFromRec(ope,n,N,Ini,K): Given the first L-1`): print(`terms of the sequence Ini=[f(1), ..., f(L-1)]`): print(`satisfied by the recurrence ope(n,N)f(n)=0`): print(`extends it to the first K values`): print(`For example, try:`): print(`SeqFromRec(N-n-1,n,N,[1],10);`): fi: end: ###Findrec #findrec(f,DEGREE,ORDER,n,N): guesses a recurrence operator annihilating #the sequence f of degree DEGREE and order ORDER #For example, try: findrec([seq(i,i=1..10)],0,2,n,N); findrecVerbose:=proc(f,DEGREE,ORDER,n,N) local ope,var,eq,i,j,n0,kv,var1,eq1,mu,a: if (1+DEGREE)*(1+ORDER)+3+ORDER>nops(f) then ERROR(`Insufficient data for a recurrence of order`,ORDER, `degree`,DEGREE): fi: ope:=0: var:={}: for i from 0 to ORDER do for j from 0 to DEGREE do ope:=ope+a[i,j]*n^j*N^i: var:=var union {a[i,j]}: od: od: eq:={}: for n0 from 1 to (1+DEGREE)*(1+ORDER)+2 do eq1:=0: for i from 0 to ORDER do eq1:=eq1+subs(n=n0,coeff(ope,N,i))*op(n0+i,f): od: eq:= eq union {eq1}: od: var1:=solve(eq,var): kv:={}: for i from 1 to nops(var1) do mu:=op(i,var1): if op(1,mu)=op(2,mu) then kv:= kv union {op(1,mu)}: fi: od: ope:=subs(var1,ope): if ope=0 then RETURN(FAIL): fi: ope:={seq(coeff(expand(ope),kv[i],1),i=1..nops(kv))} minus {0}: if nops(ope)>1 then print(`There is some slack, there are `, nops(ope)): print(ope): RETURN(Yafe(ope[1],N)[2]): elif nops(ope)=1 then RETURN(Yafe(ope[1],N)[2]): else RETURN(FAIL): fi: end: #findrec(f,DEGREE,ORDER,n,N): guesses a recurrence operator annihilating #the sequence f of degree DEGREE and order ORDER #For example, try: findrec([seq(i,i=1..10)],0,2,n,N); findrec:=proc(f,DEGREE,ORDER,n,N) local ope,var,eq,i,j,n0,kv,var1,eq1,mu,a: option remember: if not findrecEx(f,DEGREE,ORDER,ithprime(20)) then RETURN(FAIL): fi: if not findrecEx(f,DEGREE,ORDER,ithprime(40)) then RETURN(FAIL): fi: if not findrecEx(f,DEGREE,ORDER,ithprime(80)) then RETURN(FAIL): fi: if (1+DEGREE)*(1+ORDER)+5+ORDER>nops(f) then ERROR(`Insufficient data for a recurrence of order`,ORDER, `degree`,DEGREE): fi: ope:=0: var:={}: for i from 0 to ORDER do for j from 0 to DEGREE do ope:=ope+a[i,j]*n^j*N^i: var:=var union {a[i,j]}: od: od: eq:={}: for n0 from 1 to (1+DEGREE)*(1+ORDER)+4 do eq1:=0: for i from 0 to ORDER do eq1:=eq1+subs(n=n0,coeff(ope,N,i))*op(n0+i,f): od: eq:= eq union {eq1}: od: var1:=solve(eq,var): kv:={}: for i from 1 to nops(var1) do mu:=op(i,var1): if op(1,mu)=op(2,mu) then kv:= kv union {op(1,mu)}: fi: od: ope:=subs(var1,ope): if ope=0 then RETURN(FAIL): fi: ope:={seq(coeff(expand(ope),kv[i],1),i=1..nops(kv))} minus {0}: if nops(ope)>1 then RETURN(Yafe(ope[1],N)[2]): elif nops(ope)=1 then RETURN(Yafe(ope[1],N)[2]): else RETURN(FAIL): fi: end: Yafe:=proc(ope,N) local i,ope1,coe1,L: if ope=0 then RETURN(1,0): fi: ope1:=expand(ope): L:=degree(ope1,N): coe1:=coeff(ope1,N,L): ope1:=normal(ope1/coe1): ope1:=normal(ope1): ope1:= convert( [seq(factor(coeff(ope1,N,i))*N^i,i=ldegree(ope1,N)..degree(ope1,N))],`+`): factor(coe1),ope1: end: FindrecG:=proc(f,n,N,MaxC) local f1,i,ope: for i from 1 to nops(f) while f[i]=0 do od: f1:=[op(i..nops(f),f)]: ope:=Findrec(f1,n,N,MaxC): if ope=FAIL then RETURN(FAIL): else ope:=subs(n=n-i+1,ope): RETURN(ope): fi: end: #Findrec(f,n,N,MaxC): Given a list f tries to find a linear recurrence equation with #poly coffs. #of maximum DEGREE+ORDER<=MaxC #e.g. try Findrec([1,1,2,3,5,8,13,21,34,55,89],n,N,2); Findrec:=proc(f,n,N,MaxC) local DEGREE, ORDER,ope,L,Ope: for L from 0 to MaxC do for ORDER from 0 to L do DEGREE:=L-ORDER: if (2+DEGREE)*(1+ORDER)+4>=nops(f) then print(`Insufficient data for degree`, DEGREE, `and order `,ORDER): RETURN(FAIL): fi: ope:=findrec([op(1..(2+DEGREE)*(1+ORDER)+4,f)],DEGREE,ORDER,n,N): if ope<>FAIL then Ope:=numer(ope): if {seq(add(subs(n=n1,coeff(Ope,N,i))*f[n1+i],i=0..degree(Ope,N)),n1=1..nops(f)-degree(Ope,N))}<>{0} then RETURN(FAIL): else RETURN(ope): fi: fi: od: od: FAIL: end: #SeqFromRec(ope,n,N,Ini,K): Given the first L-1 #terms of the sequence Ini=[f(1), ..., f(L-1)] #satisfied by the recurrence ope(n,N)f(n)=0 #extends it to the first K values SeqFromRec:=proc(ope,n,N,Ini,K) local ope1,gu,L,n1,j1: ope1:=Yafe(ope,N)[2]: L:=degree(ope1,N): if nops(Ini)<>L then ERROR(`Ini should be of length`, L): fi: ope1:=expand(subs(n=n-L,ope1)/N^L): gu:=Ini: for n1 from nops(Ini)+1 to K do gu:=[op(gu), -add(gu[nops(gu)+1-j1]*subs(n=n1,coeff(ope1,N,-j1)), j1=1..L)]: od: gu: end: #end Findrec with(linalg): #findrecEx(f,DEGREE,ORDER,m1): Explores whether thre #is a good chance that there is a recurrence of degree DEGREE #and order ORDER, using the prime m1 #For example, try: findrecEx([seq(i,i=1..10)],0,2,n,N,1003); findrecEx:=proc(f,DEGREE,ORDER,m1) local ope,var,eq,i,j,n0,eq1,a,A1, D1,E1,Eq,Var,f1,n,N: option remember: f1:=f mod m1: if (1+DEGREE)*(1+ORDER)+5+ORDER>nops(f) then ERROR(`Insufficient data for a recurrence of order`,ORDER, `degree`,DEGREE): fi: ope:=0: var:={}: for i from 0 to ORDER do for j from 0 to DEGREE do ope:=ope+a[i,j]*n^j*N^i: var:=var union {a[i,j]}: od: od: eq:={}: for n0 from 1 to (1+DEGREE)*(1+ORDER)+4 do eq1:=0: for i from 0 to ORDER do eq1:=eq1+subs(n=n0,coeff(ope,N,i))*op(n0+i,f1) mod m1: od: eq:= eq union {eq1}: od: Eq:= convert(eq,list): Var:= convert(var,list): D1:=nops(Var): E1:=nops(Eq): if E10 then RETURN(false): fi: if E1-D1>=1 then for j from 1 to nops(Var) do A1[D1,j]:=coeff(Eq[D1+1],Var[j]): od: if det(A1) mod m1 <>0 then RETURN(false): fi: fi: if E1-D1>=2 then for j from 1 to nops(Var) do A1[D1,j]:=coeff(Eq[D1+2],Var[j]): od: if det(A1) mod m1 <>0 then RETURN(false): fi: fi: true: end: ###end Findrec #GuessPol1(L,d,n,s0): guesses a polynomial of degree d in n for # the list L, such that L[i]=P[i] for i>=s0 for example, try: #GuessPol1([(seq(i,i=1..10),1,n,1); GuessPol1:=proc(L,d,n,s0) local P,i,a,eq,var: if d>=nops(L)-s0-2 then ERROR(`the list is too small`): fi: P:=add(a[i]*n^i,i=0..d): var:={seq(a[i],i=0..d)}: eq:={seq(subs(n=i,P)-L[i],i=s0..s0+d+3)}: var:=solve(eq,var): if var=NULL then RETURN(FAIL): fi: subs(var,P): end: #GuessPol(L,n,s0): guesses a polynomial of degree d in n for # the list L, such that L[i]=P[i] for i>=s0 for example, try: #GuessPol([(seq(i,i=1..10),n,1); GuessPol:=proc(L,n,s0) local d,gu: for d from 0 to nops(L)-s0-3 do gu:=GuessPol1(L,d,n,s0): if gu<>FAIL then RETURN(gu): fi: od: FAIL: end: #GuessRat1(L,d,n,s0): Guesses a rational function of degree d in n for # the list L, such that L[i]=P[i] for i>=s0 for example, try: #GuessRat1([(seq(i/(i+1),i=1..10),1,n,1); GuessRat1:=proc(L,d,n,s0) local P,i,a,b,eq,var,e1: if s0+2*d+4>nops(L) then ERROR(`the list is too small`): fi: for e1 from 0 to d do P:=add(a[i]*n^i,i=0..d)/(1+add(b[i]*n^i,i=1..d))/n^e1: var:={seq(a[i],i=0..d),seq(b[i],i=1..d)}: eq:={seq(numer(subs(n=i,P)-L[i]),i=s0..s0+2*d+4)}: var:=solve(eq,var): if var<>NULL then RETURN(factor(normal(subs(var,P)))): fi: od: FAIL: end: #GuessRat(L,n,s0): Guesses a rational function of degree d in n for # the list L, such that L[i]=P[i] for i>=s0 for example, try: #GuessRat([(seq(i/(i+1),i=1..10),n,1); GuessRat:=proc(L,n,s0) local d,gu: for d from 0 to trunc((nops(L)-s0-4)/2) do gu:=GuessRat1(L,d,n,s0): if gu<>FAIL then RETURN(gu): fi: od: FAIL: end: ##Data Data9:=proc() option remember: [[[1]], [[1, -1], [1, 1]], [[1, -1, 1], [1, 0, -1], [1, 2, 1]], [[1, -1, 0, 1, -1], [1, 0, -1, 0, 1], [1, -1, 2, -1, 1], [1, 1, 0, -1, -1], [1, 3, 2, 3, 1]], [[1, -1, 0, 1, 0, -1, 1], [1, 0, -1, 0, 1, 0, -1], [1, -1, 1, 0, -1, 1, -1], [1 , 1, -1, 0, -1, 1, 1], [1, 0, 1, -2, 1, 0, 1], [1, 2, 1, 0, -1, -2, -1], [1, 4, 5, 6, 5, 4, 1]], [[1, -1, 0, 1, 0, 0, -1, 0, 0, 1, -1], [1, 0, -1, 0, 0, 1, 0, 0, -1, 0, 1], [1, -1, 1, 0, -1, 0, 0, -1, 1, -1, 1], [1, 1, -1, 0, -1, 0, 0, 1, 1, -1, -1], [1, -1, 0, 1, 2, -2, 1, 2, 0, -1, 1], [1, 0, 0, -1, 1, 0, 1, -1, 0, 0, -1], [1, 2, 0, 1, -1, -2, 1, -1, 0, 2, 1], [1, -1, 3, -2, -3, 0, 2, 3, -3, 1 , -1], [1, 1, 1, -2, 1, 0, -2, 1, 1, 1, 1], [1, 3, 3, 2, 1, 0, -2, -1, -3, -3, -1], [1, 5, 9, 10, 5, 16, 10, 5, 9, 5, 1]], [[1, -1, 0, 1, 0, 0, -1, 0, 0, 0, 1 , 0, 0, -1, 1], [1, 0, -1, 0, 0, 1, 0, 0, 0, -1, 0, 0, 1, 0, -1], [1, -1, 1, 0, -1, 0, 0, 1, -1, 0, 0, 1, -1, 1, -1], [1, 1, -1, 0, -1, 0, 0, 1, 1, 0, 0, -1, -\ 1, 1, 1], [1, -1, 0, 1, 1, -1, 0, -1, 1, 1, -1, -1, 0, 1, -1], [1, 0, 0, -1, 0, 1, 0, -1, -1, 1, -1, 0, 0, 0, 1], [1, 2, 0, 1, -2, -1, 0, -1, 1, 1, -1, 2, 0, -\ 2, -1], [1, 0, -1, 0, 2, -1, 2, 0, 0, -1, 0, 2, -1, 0, 1], [1, -1, 2, -1, -1, -\ 1, 2, 1, 1, -1, -1, -1, 2, -1, 1], [1, 1, 0, -1, 1, -1, 0, 1, -1, 1, 1, -1, 0, -1, -1], [1, 3, 2, 3, -1, -1, 2, -3, -3, -1, 3, -1, 2, 3, 1], [1, 0, 2, -3, 0, 1, 0, -3, 3, -1, 3, 0, -2, 0, -1], [1, 2, 2, -1, 2, -1, -4, 1, 1, -1, -1, 2, 2, 2, 1], [1, 4, 6, 5, 4, 5, 0, 1, -1, -5, -5, -4, -6, -4, -1], [1, 6, 14, 15, 14, 35, 20, 21, 21, 35, 15, 14, 14, 6, 1]], [[1, -1, 0, 1, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0, 0, 1, -1], [1, 0, -1, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0 , 1, 0, 0, 0, -1, 0, 1], [1, -1, 1, 0, -1, 0, 0, 0, 1, -1, 0, 0, 0, -1, 1, 0, 0 , 0, -1, 1, -1, 1], [1, 1, -1, 0, -1, 0, 0, 0, 1, 1, 0, 0, 0, -1, -1, 0, 0, 0, 1, 1, -1, -1], [1, -1, 0, 1, 1, -1, 0, -1, 0, 1, 0, 0, -1, 1, 0, -1, 1, -1, 1, 0, -1, 1], [1, 0, 0, -1, 0, 1, 0, -1, 0, -1, 0, 0, 0, 1, 0, -1, 1, 1, 0, 0, 0, -1], [1, 2, 0, 1, -2, -1, 0, -1, 0, 1, 0, 0, 2, 1, 0, -1, 1, -1, -2, 0, 2, 1], [1, -1, 0, 1, 0, 0, -1, 2, -2, 0, 2, -1, 2, 0, -2, 0, 1, 2, 0, 0, -1, 1], [1, 0 , -1, 0, 1, 0, 1, 1, -1, 0, 0, -1, 0, 0, 1, 0, 0, -1, -1, 1, 0, -1], [1, -1, 2, -1, -2, 0, 1, 2, 0, 0, 0, -1, 0, 0, 0, 0, 1, -2, 2, -2, 1, -1], [1, 1, 0, -1, 0 , 0, -1, 0, 0, 0, 2, -1, -2, 0, 0, 0, -1, 0, 0, 0, 1, 1], [1, 3, 2, 3, -2, 0, 1 , -2, -4, 0, 0, -1, 0, 0, 4, 0, -3, 2, 2, -2, -3, -1], [1, -1, 1, 0, 1, -2, 2, -2, 1, 1, 0, -2, 0, -1, -1, 2, 0, 2, -1, -1, 1, -1], [1, 1, -1, 0, 1, -2, 2, 2, 1, -1, 0, 2, 0, -1, 1, -2, 0, 2, 1, -1, 1, 1], [1, 0, 1, -2, 1, 0, 1, -1, -1, 0 , 0, 1, 2, 0, -1, 0, -2, -1, 1, 1, 0, 1], [1, 2, 1, 0, 1, -2, -1, 1, 1, -2, 0, 1, 0, 2, -1, 2, 0, -1, -1, -1, -2, -1], [1, 4, 5, 6, 1, 4, 5, -1, -5, -4, 0, 5, -6, -4, -5, 4, 6, -1, 1, 5, 4, 1], [1, -1, 4, -3, -4, 0, 3, 6, -2, 8, -6, 3, -6 , 8, -2, 0, -3, 6, -4, 4, -1, 1], [1, 1, 2, -3, 2, 0, -3, 0, -2, 4, 0, 3, 0, -4 , 2, 0, 3, 0, -2, -2, -1, -1], [1, 3, 4, 1, 4, 0, -5, 2, 2, 0, -6, -5, 2, 0, 2, 0, 1, 2, 4, 4, 3, 1], [1, 5, 10, 9, 10, 16, 5, 4, 10, 4, 0, -5, 0, -4, -10, -16 , -9, -4, -10, -10, -5, -1], [1, 7, 20, 21, 28, 64, 35, 14, 70, 56, 90, 35, 42, 56, 70, 64, 21, 14, 28, 20, 7, 1]], [[1, -1, 0, 1, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, -1, 1], [1, 0, -1, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 1, 0, -1], [1, -1, 1 , 0, -1, 0, 0, 0, 1, -1, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 1, -\ 1, 1, -1], [1, 1, -1, 0, -1, 0, 0, 0, 1, 1, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, -1, -1, 1, 1], [1, -1, 0, 1, 1, -1, 0, -1, 0, 1, 0, 0, 1, -1, 0, 0, 0, 0, 0, 1, -1, -1, 0, 1, -1, 1, -1, 0, 1, -1], [1, 0, 0, -1, 0, 1, 0, -1, 0 , -1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 1, -1, -1, 0, 0, 0, 1], [1, 2, 0, 1, -2, -1, 0, -1, 0, 1, 0, 0, 1, 2, 0, 0, 0, 0, 0, -2, -1, -1, 0, 1, -1, 1, 2, 0, -2, -1], [1, -1, 0, 1, 0, 0, -1, 1, -1, 0, 1, 0, -1, 1, 1, -1, -1, 1, 0, -1, 0, 1, 1, 0, -1, -1, 0, 0, 1, -1], [1, 0, -1, 0, 1, 0, 1, 0, 0, 0, -1, 0, -1, 0, 1, 1, -1, 1, -1, 0, 0, -1, 0, 0, 0, 0, 1, -1, 0, 1], [1, -1, 2, -1, -2, 0, 1, 1 , 1, 0, -1, 0, -1, -1, 1, 1, -1, 1, 2, -1, 0, -1, 1, 0, -1, 1, -2, 2, -1, 1], [ 1, 1, 0, -1, 0, 0, -1, -1, 1, 0, 1, 0, -1, -1, 1, -1, -1, 1, 0, 1, 0, 1, -1, 0, 1, 1, 0, 0, -1, -1], [1, 3, 2, 3, -2, 0, 1, -3, -3, 0, -1, 0, -1, 3, 1, 1, -1, 1, 2, 3, 0, -1, -3, 0, 3, -3, -2, 2, 3, 1], [1, 0, -1, 0, 0, 1, 0, 2, -2, 0, 1, -2, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, -2, 1, 0, 2, 0, -1, 0, 1], [1, -1, 1, 0, 0, -\ 1, 1, 0, 0, 0, 1, -2, 0, 1, -1, -1, 1, 1, -2, 1, 0, 0, 0, -1, 0, 0, 0, 1, -1, 1 ], [1, 1, -1, 0, 0, -1, 1, 2, 0, 0, 1, 0, 0, -1, -1, 1, -1, -1, 0, 1, 0, 0, 0, 1, 0, -2, 0, 1, -1, -1], [1, 0, 1, -2, 0, 1, 0, 0, -2, 0, 1, 0, 2, 0, 0, 0, -1, 0, 0, 0, 0, -2, 2, -1, 2, 0, 0, -1, 0, -1], [1, 2, 1, 0, 0, -1, -2, 0, 0, 0, 1, -2, 0, -2, 2, 2, 1, -2, -2, -2, 0, 0, 0, -1, 0, 0, 0, 1, 2, 1], [1, 4, 5, 6, 0, 5, 4, -4, -6, 0, 1, 0, -6, -4, -4, 4, -1, -4, 0, 4, 0, 6, 6, -5, -6, 4, 0, -5, -4, -1], [1, -1, 0, 1, 3, -3, 2, -3, 0, 3, 0, -2, 3, -3, 0, 0, 0, 2, 6, -3, 3, 3, 0, -3, 1, -3, 3, 0, -1, 1], [1, 0, 0, -1, 2, -1, 2, -1, 0, -1, 0, 0, -1, 2, 0, 0, 0, -2, 0, -2, 1, 1, 0, 1, 1, 1, -2, 0, 0, -1], [1, 2, 0, 1, 0, -3, 2, 3, 0, -3, 0, 4, 3, 0, 0, 0, 0, 2, 0, 0, -3, 3, 0, -3, 1, 3, 0, 0, 2, 1], [1, -1, 3 , -2, -2, -1, 3, 2, 0, 4, -3, 0, -2, -1, 3, -3, 3, -3, 0, 1, -4, 2, 0, 1, 2, -2 , 2, -3, 1, -1], [1, 1, 1, -2, 2, -1, -1, 0, 0, 0, 1, 2, -2, 1, -1, -1, 1, -1, 2, 1, 0, -2, 0, -1, -2, 0, 2, 1, 1, 1], [1, 3, 3, 2, 2, -1, -1, 2, 0, -4, -3, 0 , 2, -1, 3, -3, 3, 1, 0, 1, 4, -2, 0, 1, -2, -2, -2, -3, -3, -1], [1, 5, 9, 10, 6, 15, 11, 0, 0, 0, 9, 10, -6, -15, -9, -9, 9, 11, -6, -15, 0, -6, 0, 15, 10, 0 , 6, 9, 5, 1], [1, 0, 3, -4, 0, 1, 0, 2, -6, 8, -3, 6, 4, 0, 0, 0, -3, 0, -6, 0 , 8, 4, -6, 1, -4, 2, 0, 3, 0, 1], [1, 2, 3, -2, 4, -1, -6, 2, 0, 4, -3, 0, -2, 2, -6, 6, 3, 6, 0, -2, -4, 2, 0, 1, 2, -2, -4, -3, -2, -1], [1, 4, 7, 4, 8, 5, -4, 6, 6, 0, -11, -10, 4, 4, -4, -4, -11, -4, 2, 4, 0, 4, 6, 5, 4, 6, 8, 7, 4, 1], [1, 6, 15, 14, 20, 35, 14, 14, 36, 20, 21, 0, 14, 14, 6, -6, -21, -14, 0, -\ 14, -20, -14, -36, -35, -14, -14, -20, -15, -6, -1], [1, 8, 27, 28, 48, 105, 56 , 42, 162, 120, 189, 70, 84, 168, 216, 216, 189, 56, 42, 168, 120, 84, 162, 105 , 28, 42, 48, 27, 8, 1]]]: end: ###End Data #--------------------- IsPar ----------------------- IsPar:= proc(lam)local i: #this procedure tests that lam valid if not type (lam,list) then #is lam a list? RETURN(false): fi: for i from 1 to nops(lam) do #are the list elements of lam integers? if not (type(lam[i], integer) and lam[i]>0) then RETURN(false): fi: od: for i from 1 to nops(lam) -1 do #is lam in the correct (non-increasing) order? if lam[i] - lam[i+1] < 0 then RETURN(false): fi: od: true: #if we pass the tests, then we've got it end: #IsPar #--------------------- Chop ----------------------- Chop:=proc(lam) local i: for i from 1 to nops(lam) while lam[i]>0 do od: i:=i-1: [op(1..i,lam)]: end: #Chop #--------------------- Conj ----------------------- Conj:=proc(lam) local i,lam1,Lam1,n : if lam=[] then RETURN([]): fi: if IsPar(lam) then n:=nops(lam): lam1:=Chop([ seq( lam[i]-1, i=1..n) ]): Lam1:=Conj(lam1): [n, op(Lam1)]: else ERROR(`lam must be an integer list in non-increasing order`): fi: end: #Conj #ApplyPer(f,x,pi1): Applies the permutation pi to the (n=nops(pi)) #function (or expression) f that depends on x[1], ..., x[n] ApplyPer:=proc(f,x,pi1) local i,su: su:={seq(x[i]=x[pi1[i]], i=1.. nops(pi1))}; subs(su,f); end: #Symm(f,x,n): The symmetrizer of the function (or expression) #f(x[1], ..., x[n]) Symm:=proc(f,x,n) local pers,i: pers:=permute(n): convert([seq(ApplyPer(f,x,pers[i]), i=1..nops(pers))], `+`)/nops(pers); end: RevMM:=proc(P) local i,N: N:=nops(P): [seq(P[N-i+1] , i=1..N)]: end: Partition:=proc(n) local P,i,N: P:=partition(n): N:=nops(P); RevMM([seq(RevMM(P[i]),i=1..N)]): end: Monom:=proc(lambda,x) local i: convert( [seq(x[i]^lambda[i],i=1..nops(lambda) )], `*`): end: m_lambda:=proc(lambda,x,m) local i,Perms1,lambda1: if m< nops(lambda) then ERROR(`The number of variables should be >= number of parts of lambda`): fi: lambda1:=[op(lambda), seq(0,i=1..m-nops(lambda))]: Perms1:=permute(lambda1): convert( [seq(Monom(Perms1[i],x,m) , i=1..nops(Perms1))] , `+`): end: #ei(x,i,m): The elementary symmetric function e_i(x[1], ..., x[m]) ei:=proc(x,i,m) m_lambda([ 1$i ] , x, m): end: #pi1(x,i,m): The power-sum symmetric function e_i(x[1], ..., x[m]) pi1:=proc(x,i,m) m_lambda([i] , x, m): end: #hi(x,i,m): The complete homog. symm. function of degree i in #x[1], x[2], ..., x[m] hi:=proc(x,i,m) local P,i1: P:=Partition(i): convert( [seq( m_lambda(P[i1],x,m), i1=1..nops(P))] , `+`): end: higf:=proc(x,i,m) local t,i1,P: P:= convert([seq( 1/(1- x[i1]*t), i1=1..m)], `*`): P:=taylor(P,t=0,i+1): expand(coeff(P,t,i)): end: #e_lambda(lambda,x,m): The elemnatry symmetric #function basis e_lambda(x[1], ..., x[m]) e_lambda:=proc(lambda,x,m) local i1: expand( convert( [seq(ei(x,lambda[i1],m),i1=1..nops(lambda))], `*`)): end: #h_lambda(lambda,x,m): The complete homog. symmetric #function basis h_lambda(x[1], ..., x[m]) h_lambda:=proc(lambda,x,m) local i1: expand( convert( [seq(higf(x,lambda[i1],m),i1=1..nops(lambda))], `*`)): end: #p_lambda(lambda,x,m): The power-sum symmetric #function basis p_lambda(x[1], ..., x[m]) p_lambda:=proc(lambda,x,m) local i1: expand( convert( [seq(pi1(x,lambda[i1],m),i1=1..nops(lambda))], `*`)): end: MtoE:=proc(n) local P,i1,j1,N,A,E1,lam1,k1,E1a,x: P:=Partition(n): N:=nops(P): A:=matrix(N,N): for i1 from 1 to N do E1:=expand(e_lambda(P[i1],x,n)): for j1 from 1 to N do lam1:=P[j1]: E1a:=E1: for k1 from 1 to nops(lam1) do E1a:=coeff(E1a,x[k1],lam1[k1]): od: A[i1,j1]:=E1a: od: od: op(A): end: MtoH:=proc(n) local P,i1,j1,N,A,E1,lam1,k1,E1a,x: P:=Partition(n): N:=nops(P): A:=matrix(N,N): for i1 from 1 to N do E1:=expand(h_lambda(P[i1],x,n)): for j1 from 1 to N do lam1:=P[j1]: E1a:=E1: for k1 from 1 to nops(lam1) do E1a:=coeff(E1a,x[k1],lam1[k1]): od: A[i1,j1]:=E1a: od: od: op(A): end: MtoP:=proc(n) local P,i1,j1,N,A,E1,lam1,k1,E1a,x: P:=Partition(n): N:=nops(P): A:=matrix(N,N): for i1 from 1 to N do E1:=expand(p_lambda(P[i1],x,n)): for j1 from 1 to N do lam1:=P[j1]: E1a:=E1: for k1 from 1 to nops(lam1) do E1a:=coeff(E1a,x[k1],lam1[k1]): od: A[i1,j1]:=E1a: od: od: op(A): end: EtoM:=proc(n): inverse(MtoE(n)):end: HtoM:=proc(n): inverse(MtoH(n)):end: PtoM:=proc(n): inverse(MtoP(n)):end: MonomToPar:=proc(P,x,n) local i1,lam1,coe: lam1:=[seq(degree(P,x[i1]),i1=1..n)] : coe:=normal(P/convert([seq(x[i1]^lam1[i1],i1=1..nops(lam1))],`*`)): coe,Chop(RevMM(sort(lam1))): end: SPtoM:=proc(P,x,n,m) local P1,Q,mono1,lam1,coe1: P1:=expand(P): if P1=0 then RETURN(0): fi: if Symm(P1,x,n)<>P1 then RETURN(FAIL): fi: Q:=0: while type(P1,`+`) do mono1:=op(1,P1): lam1:=MonomToPar(mono1,x,n): coe1:=lam1[1]: lam1:=lam1[2]: Q:=Q+coe1*m[op(lam1)]: P1:=expand(P1-coe1*m_lambda(lam1,x,n)): od: if P1<>0 then lam1:=MonomToPar(P1,x,n): coe1:=lam1[1]: lam1:=lam1[2]: Q:=Q+coe1*m[op(lam1)]: P1:=expand(P1-coe1*m_lambda(lam1,x,n)): fi: Q: end: SPtoMyz:=proc(P,x,n,m) local P1; P1 := expand(P): if P1 = 0 then return(0): fi: if Symm(P1,x,n)<>P1 then return(FAIL); fi: convert(map(proc(p) p[1]*m[op(p[2])] end proc, map(MonomToPar,{op(P1)},x,n) ), `+`); end: EtoH:=proc(n): multiply( MtoH(n),EtoM(n)): end: EtoP:=proc(n): multiply( MtoP(n),EtoM(n)): end: HtoE:=proc(n): multiply( MtoE(n),HtoM(n)): end: HtoP:=proc(n): multiply( MtoP(n),HtoM(n)): end: PtoH:=proc(n): multiply( MtoH(n),PtoM(n)): end: PtoE:=proc(n): multiply( MtoE(n),PtoM(n)): end: #sLam(L,x): The Schur funcion s_L #Try: #sLam([2,2,1],x); sLam:=proc(L,x) local n,L1,i,j: n:=convert(L,`+`): L1:=[op(L),0$(n-nops(L))]: expand(normal(det([seq([seq(x[i]^(L1[j]+n-j),j=1..n)],i=1..n)])/mul(mul(x[i]-x[j],i=1..j-1),j=1..n))): end: #sToM(n): The Schur to M Matrix, try: #sToM(4); sToM:=proc(n) local P,i1,j1,N,A,E1,lam1,k1,E1a,x: P:=Partition(n): N:=nops(P): A:=matrix(N,N): for i1 from 1 to N do E1:=sLam(P[i1],x): for j1 from 1 to N do lam1:=P[j1]: E1a:=E1: for k1 from 1 to nops(lam1) do E1a:=coeff(E1a,x[k1],lam1[k1]): od: A[i1,j1]:=E1a: od: od: op(A): end: #ChaTabS(n): the character table of S_n done slowly. #Try: #ChaTabS(3); ChaTabS:=proc(n) local P,i,j: P:=Partition(n): [seq([seq(chiMLold(P[i],P[j]),j=1..nops(P))],i=1..nops(P))]: end: #ChaTab(n): the character table of S_n #Try: #ChaTab(3); ChaTab:=proc(n) local M,P,i,j: option remember: M:=inverse(multiply(sToM(n),PtoM(n))): P:=Partition(n): [seq([seq(M[i,j],j=1..nops(P))],i=1..nops(P))]: end: #ChaTabPC(n): the character table of S_n, using pre-comupted data #it inputs a pos. integer n, and outputs the list of partitions of n, in rev. lex. order, #followed by the p(n) by p(n) character tables, following that order. Try: #ChaTabPC(3); ChaTabPC:=proc(n) local M,P,i,j: P:=Partition(n),Data9()[n]: end: #SofS(n): inputs a positive integer n and outputs the list of size p(n) whose #i-th item is the sum of squares of the character table of S_n for #the i-th partition. It also returns the list of partions. Try: #SofS(5); SofS:=proc(n) local M,i,j: option remember: if n<=9 then M:=Data9()[n]: else M:=ChaTab(n): fi: [seq(add(M[i][j]^2,j=1..nops(M[i])),i=1..nops(M))]: end: #ID(L): The ID of a partition L, try: ID([1,1,1,1]); ID:=proc(L) local P,i,n: option remember: n:=convert(L,`+`): P:=Partition(n): for i from 1 to nops(P) while P[i]<>L do od: i: end: #ID1(L): The ID of a partition L, according to Maple. try: ID1([1,1,1,1]); ID1:=proc(L) local P,i,n,L1: option remember: n:=convert(L,`+`): P:=partition(n): L1:=[seq(L[nops(L)-i1+1],i1=1..nops(L))]: for i from 1 to nops(P) while P[i]<>L1 do od: i: end: #chiMLold(R,L): the value of chi_R^L, Done directly. Try #chiMLold([3],[2,1]); chiMLold:=proc(R,L) local M,n: n:=convert(R,`+`): if convert(L,`+`)<>n then RETURN(FAIL): fi: if n<=9 then RETURN(chiMLpc(R,L)): fi: M:=ChaTab(n): M[ID(R)][ID(L)]: end: #Yeladim(L): all the children of L, try: #Yeladim([3,2,2]); Yeladim:=proc(L) local gu,i: option remember: gu:={}: for i from 1 to nops(L)-1 do if L[i]>L[i+1] then gu:=gu union {[op(1..i-1,L),L[i]-1,op(i+1..nops(L),L)]}: fi: od: if L[nops(L)]>1 then gu:=gu union {[op(1..nops(L)-1,L),L[nops(L)]-1]}: else gu:=gu union {[op(1..nops(L)-1,L)]}: fi: gu: end: #Horim(L): all the parents of L, try: #Horim([3,2,2]); Horim:=proc(L) local gu,i: option remember: if L=[] then RETURN({[1]}): fi: gu:={[L[1]+1,op(2..nops(L),L)], [op(L),1]}: for i from 2 to nops(L) do if L[i]n then RETURN(FAIL): fi: if M[nops(M)]>1 then M1:=[op(1..nops(M)-1,M),M[nops(M)]-1]: else M1:=[op(1..nops(M)-1,M)]: fi: gu:=Yeladim(L): chiML(M,L)-add(chiML(M1,L1),L1 in gu): end: #GoingUp(M,L): (n+1)*chiML(M,L)-Sum(ChiRK(M',L') over all the parents of L' of L and M' is M with 1 added #Try: #GoingUp([1,1,1,1],[2,2]); GoingUp:=proc(M,L) local n,M1,L1,gu: n:=convert(M,`+`): if convert(L,`+`)<>n then RETURN(FAIL): fi: M1:=[op(M),1]: gu:=Horim(L): (n+1)*chiML(M,L)-add(chiML(M1,L1),L1 in gu): end: #GoingUpRat(M,L): Sum(ChiRK(M',L')/chiML(M,L) over all the parents of L' of L and M' is M with 1 added #Try: #GoingUpRat([1,1,1,1],[2,2]); GoingUpRat:=proc(M,L) local n,M1,L1,gu,ku: n:=convert(M,`+`): if convert(L,`+`)<>n then RETURN(FAIL): fi: M1:=[op(M),1]: gu:=Horim(L): ku:=chiML(M,L): if ku=0 then if add(chiML(M1,L1),L1 in gu)=0 then RETURN(0): else RETURN(-10^10): fi: fi: add(chiML(M1,L1),L1 in gu)/ku: end: #chiMLpc(R,L): the value of chi_R^L, using pre-computed data. Try: #chiMLpc([3],[2,1]); chiMLpc:=proc(R,L) local M,n: n:=convert(R,`+`): if convert(L,`+`)<>n then RETURN(FAIL): fi: if n>9 then print(`We only precomputed for n<=9 `): RETURN(FAIL): fi: M:=Data9()[n]: M[ID(R)][ID(L)]: end: Van:=proc(L) local i,j,n: n:=nops(L): mul(mul(L[i]-L[j],i=1..j-1),j=1..n): end: #KamaEkhadim(L): The number of 1's in L KamaEkhadim:=proc(L) local i: for i from 0 to nops(L)-1 while L[nops(L)-i]=1 do od: i: end: #CheckGoingUp(n): Checks the Going Up Recurrence for all partitions of n #It is only fast for n<=8 (since it uses precomputed values) #Try: #CheckGoingUp(5); CheckGoingUp:=proc(n) local gu,L,L1, M: gu:=Partition(n): evalb({seq(seq((KamaEkhadim(M)+1)*chiML(M,L)-add(chiML([op(M),1],L1),L1 in Horim(L)), L in gu), M in gu)}={0}): end: #CheckGoingDown(n): Checks the Going Down Recurrence for all partitions of n that end with 1 #It is only fast for n<=9 (since it uses precomputed values) #Try: #CheckGoingDown(5); CheckGoingDown:=proc(n) local gu,L,L1, M,mu: gu:=Partition(n-1): mu:=Partition(n): evalb({seq(seq(chiML([op(M),1],L)-add(chiML(M,L1),L1 in Yeladim(L)), L in mu), M in gu)}={0}): end: #Coe(F,var,L): the coefficient of mul(var[i]^L[i] ,i=1..nops(L)) in F #Try: #Coe((x1+x2+x2)^5,[x1,x2,x2],[2,2,1]); Coe:=proc(F,var,L) local F1,i: F1:=expand(F): if nops(var)<>nops(L) then RETURN(FAIL): fi: for i from 1 to nops(L) do F1:=coeff(F1,var[i],L[i]): od: F1: end: #NYT(L): The number of Young Tableaux using a new recurrence #Try: NYT([3,3,3]); NYT:=proc(L) local L1,i,j,gu,n: option remember: if L=[] then RETURN(1): fi: n:=convert(L,`+`): gu:=0: for i from 1 to nops(L) do if L[i]-i+1>=0 then L1:=[seq(L[j]+1,j=1..i-1),op(i+1..nops(L),L)]: gu:=gu+(-1)^(i-1)*binomial(n,L[i]-i+1)*NYT(L1): fi: od: gu: end: #CheckLemma1(tau): checks empirically that the coeff. of x[n] in Van([x[1], ..., x[n]])*p_tau(x[1], ..., x[n])*(1/x[1]+...+1/x[n]) #when the smallest part of tau is >=2 is always 0, try: #CheckLemma1([2,2,2]); CheckLemma1:=proc(tau) local n,x,k,gu,i: k:=nops(tau): if tau[k]<2 then print(tau, `can't end with 1 `): fi: n:=convert(tau,`+`): gu:=expand(Van([seq(x[i],i=1..n)])*p_lambda(tau,x,n)*add(1/x[i],i=1..n)): coeff(gu,x[n],0): end: #CheckLemma1A(tau): checks empirically that the coeff. of x[n] in Van([x[1], ..., x[n]])*p_tau(x[1], ..., x[n])*(1/x[1]+...+1/x[n]) #when the smallest part of tau is >=2 is always 0, try: #CheckLemma1([2,2,2]); CheckLemma1A:=proc(tau) local n,x,k,i: k:=nops(tau): if tau[k]<2 then print(tau, `can't end with 1 `): fi: n:=convert(tau,`+`): [seq(coeff(expand(Van([seq(x[i],i=1..n)])*p_lambda(tau,x,n)/x[i]),x[n],0),i=1..n)]: end: #ChaTabPCv(n): the Verbose form of the character table of S_n, using pre-comupted data. n must be (for now) <=9.Try: #ChaTabPCv(3); ChaTabPCv:=proc(n) local gu,S: if n>9 then print(`Not yet implemented`): RETURN(FAIL): fi: gu:=ChaTabPC(n): print(`The Character Table of`, S[n] ): print(``): print(`There are`, nops(gu[1]), ` (integer) partitions of`, n, `Here there are in rev. lex. order `): print(``): lprint(gu[1]): print(``): print(`The Character table, following that ordering is`): lprint(gu[2]): end: #ChaTabPCvAll(n) all the Character Tables up to n, So far n<=9 ChaTabPCvAll:=proc(n) local n1: print(`The Character Tables of S[N]`, ` for N from 1 to `, n ): if n>9 then print(`Not yet implemented`): RETURN(FAIL): fi: for n1 from 1 to n do print(``): print(`--------------------------------------`): print(``): ChaTabPCv(n1): od: print(``): print(`--------------------------------------`): print(`This ends this article`): end: #SofS1old(R): inputs an integer partition R, of n, say and outputs #sum(chiML(R,L)^2, L in Partion(n)); #Try: #SofS1old([3,2]); SofS1old:=proc(R) local n,gu,i: option remember: n:=convert(R,`+`): gu:=Partition(n): add(chiMLpc(R,gu[i])^2, i=1..nops(gu)): end: #chiML(R,L): the value of chi_R^L according to Maple #chiML([3],[2,1]); chiML:=proc(R,L) local R1,L1,i1: R1:=[seq(R[nops(R)+1-i1],i1=1..nops(R))]: L1:=[seq(L[nops(L)+1-i1],i1=1..nops(L))]: Chi(L1,R1): end: #SofS1(R): inputs an integer partition R, of n, say and outputs #sum(chiML(R,L)^2, L in Partion(n)); #Try: #SofS1([3,2]); SofS1:=proc(R) local n,gu,i: option remember: n:=convert(R,`+`): gu:=Partition(n): add(chiML(R,gu[i])^2, i=1..nops(gu)): end: #ParToF(P): translates a partition to frequency notation, try: #ParToF([3,3,3,2,2]); ParToF:=proc(P) local i,a,mu: if P=[] then RETURN([]): fi: a:=P[1]: for i from 1 to nops(P) while P[i]=a do od: mu:=[op(i..nops(P),P)]: mu:=ParToF(mu): [[a,i-1],op(mu)]: end: #Amitai(mu): The conjectured explicit expression for SofS1(R) Amitai:=proc(mu) local L,i: L:=ParToF(mu): mul(L[i][1]^L[i][2]*L[i][2]!,i=1..nops(L)): end: #CheckAmitai1(n): checks the conjecture for all partitions of n. Try: #CheckAmitai1(10); CheckAmitai1:=proc(n) local gu,i: gu:=Partition(n): evalb({seq(SofS1(gu[i])-Amitai(gu[i]),i=1..nops(gu))}={0}): end: #CheckAmitai(n): checks the conjecture for all partitions of n1 for n<=n1. Try: #CheckAmitai(10); CheckAmitai:=proc(n) local n1: print(`Conjecture 12.3 for all partitions of integers at most`, n, `is `): evalb({seq(CheckAmitai1(n1),n1=1..n)}={true}): end: #K71(a,b): Inputs positive integers a and b such that a>=b>=0 and outputs chiML([2,1^(a+b-2)],[a,b]); #Try: #K71(5,3); K71:=proc(a,b): (a-b+1)*(a+b-2)!/(a+1)!/b!*(a^2-a+b^2-3*b): end: #C71(N): the sequence sum(chiML([2,1$(n-2)],[n-j,j])^2,j=0..n/2) from n=3 to n=N. Try: #C71(30); C71:=proc(N) local n,j: [seq(add(K71(n-j,j)^2,j=0..trunc(n/2)),n=3..N)]: end: #psiMu1(Mu,a,b0,K): inputs a partition Mu, a symbol a, an integer b0, and a fairly large positive integer K, #outputs a polynomial expression, by using K values of a #in a, for chiML([Mu,1$(a+b0-|Mu])],[a,b0]), valid for a0>=max(|Mu|,b0). Try: #psiMu1([3],a,2,30); psiMu1:=proc(Mu,a,b0,K) local Mu0,gu,a0,lu: Mu0:=convert(Mu,`+`): gu:=[seq(chiML([op(Mu),1$(a0+b0-Mu0)],[a0,b0]) ,a0=1..K)]: lu:=GuessPol(gu,a,max(b0,Mu0)): if lu=FAIL then RETURN(FAIL): else RETURN(lu): fi: end: #CFmuR(Mu,L): The closed-form expression for ChiRL([Mu,1^(n-|Mu|)],L), where L is a (symbolic) shape of a fixed length (nops(L)). Try: #CFmuR([2],[a,b]); CFmuR:=proc(Mu,L) local k,x,gu,gu1,lu,dar,coe,i1,i,j,L1,lu1: option remember: k:=nops(L): lu1:=convert(L,`+`)!/mul(L[i]!,i=1..k): gu:=expand(mul(mul(x[i]-x[j],i=1..j-1),j=1..k)*mul(add(x[i]^Mu[j],i=1..k),j=1..nops(Mu))): gu:=expand(gu/mul(x[i]^(k-i),i=1..k)): if not type(gu,`+`) then RETURN(FAIL): fi: lu:=0: for i from 1 to nops(gu) do gu1:=op(i,gu): dar:=[seq(degree(gu1,x[i1]),i1=1..k)]: coe:=normal(gu1/mul(x[i1]^dar[i1],i1=1..k)): if not type(coe,integer) then RETURN(FAIL): fi: L1:=[seq(L[i1]-dar[i1],i1=1..k)]: lu:=normal(lu+coe*simplify(convert(L1,`+`)!/mul(L1[i1]!,i1=1..k)/lu1)): od: lu:=factor(lu): lu*lu1: end: #CFmu(Mu,L,MC): The closed-form expression for ChiRL([Mu,1^(n-|Mu|)],L), where L is a (symbolic) shape of a fixed length (nops(L)). Try: #CFmu([2],[a,b],MC); CFmu:=proc(Mu,L,MC) local k,x,gu,gu1,lu,dar,coe,i1,i,j,L1,lu1: option remember: k:=nops(L): lu1:=convert(L,`+`)!/mul(L[i]!,i=1..k): gu:=expand(mul(mul(x[i]-x[j],i=1..j-1),j=1..k)*mul(add(x[i]^Mu[j],i=1..k),j=1..nops(Mu))): gu:=expand(gu/mul(x[i]^(k-i),i=1..k)): if not type(gu,`+`) then RETURN(FAIL): fi: lu:=0: for i from 1 to nops(gu) do gu1:=op(i,gu): dar:=[seq(degree(gu1,x[i1]),i1=1..k)]: coe:=normal(gu1/mul(x[i1]^dar[i1],i1=1..k)): if not type(coe,integer) then RETURN(FAIL): fi: L1:=[seq(L[i1]-dar[i1],i1=1..k)]: lu:=normal(lu+coe*MC(L1)): od: lu:=factor(lu): lu: end: #CheckCFmu2(Mu,N): checks CFmu for Mu and two-rowed shapes with largest parts<=N. Try: #CheckCFmu2([2,1],10); CheckCFmu2:=proc(Mu,N) local a1,b1,lu,a,b,Mu0: Mu0:=convert(Mu,`+`): if N<=Mu0 then print(N, `should be at least `, Mu0): RETURN(FAIL): fi: lu:=CFmuR(Mu,[a,b]): evalb({seq(seq(eval(subs({a=a1,b=b1},lu))-chiML([op(Mu),1$(a1+b1-Mu0)],[a1,b1]),b1=Mu0..a1),a1=Mu0..N)}={0}): end: #CheckCFmu3(Mu,N): checks CFmu for Mu and for three-rowed shapes with largest parts<=N. Try: #CheckCFmu3([2,1],10); CheckCFmu3:=proc(Mu,N) local a1,b1,c1,lu,a,b,c,Mu0: Mu0:=convert(Mu,`+`): if N<=Mu0 then print(N, `should be at least `, Mu0): RETURN(FAIL): fi: lu:=CFmuR(Mu,[a,b,c]): evalb({seq(seq(seq(eval(subs({a=a1,b=b1,c=c1},lu))-chiML([op(Mu),1$(a1+b1+c1-Mu0)],[a1,b1,c1]),c1=Mu0..b1),b1=Mu0..a1),a1=Mu0..N)}={0}): end: #CheckCFmu4(Mu,N): checks CFmu for Mu and for four-rowed shapes with largest parts<=N. Try: #CheckCFmu4([2,1],10); CheckCFmu4:=proc(Mu,N) local a1,b1,c1,d1,lu,a,b,c,d,Mu0: Mu0:=convert(Mu,`+`): if N<=Mu0 then print(N, `should be at least `, Mu0): RETURN(FAIL): fi: lu:=CFmuR(Mu,[a,b,c,d]): evalb({seq(seq(seq( seq(eval(subs({a=a1,b=b1,c=c1,d=d1},lu)) -chiML([op(Mu),1$(a1+b1+c1+d1-Mu0)],[a1,b1,c1,d1]),d1=Mu0..c1),c1=Mu0..b1),b1=Mu0..a1),a1=Mu0..N)}={0}): end: #PARnk(n,k): the set of partitions of n into at most k parts. Try: #PARnk(10,3); PARnk:=proc(n,k) local gu,mu,i,i1,mu1: option remember: if k=0 then if n=0 then RETURN({[]}): else RETURN({}): fi: fi: gu:={}: for i from 0 to trunc(n/k) do mu:=PARnk(n-i*k,k-1): gu:=gu union {seq( [seq(mu1[i1]+i,i1=1..k-1),i],mu1 in mu)} od: gu: end: #PSI(Mu,k,p,N0): The sum of ChiRL([Mu,1$(N0-|Mu|)],lambda)^p over all shapes lambda with <=k rows with N0 cells. Try: #PSI([2],2,2,9); PSI:=proc(Mu,k,p,N0) local lu,gu,a,i,lu1,MC: option remember: lu:=PARnk(N0,k): gu:=CFmu(Mu,[seq(a[i],i=1..k)],MC): add(eval(subs({seq(a[i]=lu1[i],i=1..k),MC=MC1},gu))^p,lu1 in lu): end: #PsiSeq(Mu,k,pow,N0): The first N0 terms, starting with the sum of Mu, for the #sequence of the sum of ChiRL([Mu,1$(N-|Mu|)],lambda)^p over all shapes lambda with <=k rows with N cells. Try: #PsiSeq([2],2,2,9); PsiSeq:=proc(Mu,k,pow,N0) local Mu0,n: option remember: Mu0:=convert(Mu,`+`): [seq(PSI(Mu,k,pow,n),n=Mu0..Mu0+N0)]: end: #PsiRec1(Mu,k,pow,n,N,DEG): Finds a recurrence operator of the first order and degree<=DEG, ope(n,N), annihilating #PsiSeq(Mu,k,pow), or returns FAIL. Try: #PsiRec1([2],2,2,n,N,10); PsiRec1:=proc(Mu,k,pow,n,N,DEG) local gu,ope,N0,d: N0:=(2+DEG)*2+7: gu:=PsiSeq(Mu,k,pow,N0): for d from 1 to DEG do ope:=findrec(gu,d,1,n,N): if ope<>FAIL then RETURN(ope): fi: od: FAIL: end: #PsiRec(Mu,k,pow,n,N,COMP): Finds a recurrence operator of Degree+ORDER<=COMP, ope(n,N), annihilating #PsiSeq(Mu,k,pow), or returns FAIL. Try: #PsiRec([2],2,2,n,N,10); PsiRec:=proc(Mu,k,pow,n,N,COMP) local gu,N0,DEGREE: option remember: N0:=max(seq( (2+DEGREE)*(1+COMP-DEGREE)+4,DEGREE=0..COMP)): gu:=PsiSeq(Mu,k,pow,N0): FindrecG(gu,n,N,COMP): end: #CFSmu(Mu,L): The closed-form expression for ChiRL([Mu,1^(n-|Mu|)],L), where L is a (symbolic) shape of a fixed length (nops(L)). #but expressed as shifts of the multinomial coefficient. #CFSmu([2],[a,b]); CFSmu:=proc(Mu,L) local k,x,gu,gu1,lu,dar,coe,i1,i,j,L1: option remember: k:=nops(L): gu:=expand(mul(mul(x[i]-x[j],i=1..j-1),j=1..k)*mul(add(x[i]^Mu[j],i=1..k),j=1..nops(Mu))): gu:=expand(gu/mul(x[i]^(k-i),i=1..k)): if not type(gu,`+`) then RETURN(FAIL): fi: lu:=0: for i from 1 to nops(gu) do gu1:=op(i,gu): dar:=[seq(degree(gu1,x[i1]),i1=1..k)]: coe:=normal(gu1/mul(x[i1]^dar[i1],i1=1..k)): if not type(coe,integer) then RETURN(FAIL): fi: L1:=[seq(L[i1]-dar[i1],i1=1..k)]: lu:=lu+coe*convert(L1,`+`)!/mul(L1[i1]!,i1=1..k): od: lu: end: #Psi2(Mu,n,N0): Finds an explicit expression for #The sum of chiML([Mu,1$(n-|Mu|)^2],[n-k,k]) over all shapes with two rows for k<=n/2 valid for n starting #at |Mu|. Uses N0 data points. Try: #Psi2([2],n,30); Psi2:=proc(Mu,n,N0) local gu,Mu0,i,lu: option remember: if Mu=[] then RETURN(binomial(2*n,n)/(n+1)): fi: Mu0:=convert(Mu,`+`): gu:=PsiSeq(Mu,2,2,N0): gu:=[0$(Mu0-1),seq(gu[i]/binomial(2*(i+Mu0-1),i+Mu0-1),i=1..nops(gu))]: lu:=GuessRat(gu,n,Mu0): if lu=FAIL then RETURN(FAIL): else RETURN(lu*binomial(2*n,n)): fi: end: #chiMLhook(R,L): the value of chi_R^L, and when L is a hook [k,1$(n-k)] #chiMLhook([1,1,1,1,1,1],[2,1,1,1,1]); chiMLhook:=proc(R,L) local gu,x,i,j,n: option remember: n:=convert(R,`+`): if convert(L,`+`)<>n then RETURN(FAIL): fi: if {seq(L[i],i=2..nops(L))}<{1} then print(L, `is not a hook`): RETURN(FAIL): fi: gu:=mul(mul(1-x[j]/x[i],i=1..j-1),j=2..nops(L))*mul(add(x[i]^R[j],i=1..nops(L)),j=1..nops(R)): for i from 2 to nops(L) do gu:=coeff(gu,x[i],L[i]): od: coeff(gu,x[1],L[1]): end: #CFmuHookDirect(Mu,n,k): a closed-form expression for chiML([Mu,1$(n-|Mu|)],[k,1$(n-k]) #for n>=k>=|Mu|. Done directly, only for checking. Try: #CFmuHookDirect([2],n,k); CFmuHookDirect:=proc(Mu,n,k) local gu,eq,var,a,i,Mu0,k1,n1: option remember: Mu0:=convert(Mu,`+`): var:={seq(a[i],i=1..Mu0+1)}: gu:=add(a[i]*binomial(n-1-Mu0,k-i),i=1..Mu0+1): eq:={seq(seq(eval(subs({n=n1,k=k1},gu))-chiML([op(Mu),1$(n1-Mu0)],[k1,1$(n1-k1)]), k1=n1-Mu0..n1),n1=Mu0+1..Mu0+2)}: var:=solve(eq,var): if var=NULL then RETURN(FAIL): fi: subs(var,gu): end: #PHI(Mu,p,N0): The sum of ChiRL([Mu,1$(N-|Mu|)],[k,1$(n-k)])^p over all #k from 1 to n #PHI([2],2,9); PHI:=proc(Mu,p,N0) local n,k,k1,gu: option remember: gu:=CFmuHook(Mu,n,k): add(eval(subs({n=N0,k=k1},gu))^p,k1=1..N0): end: #PhiSeq(Mu,pow,N0): The first N0 terms, starting with the sum of Mu, for the #sequence of the sum of ChiRL([Mu,1$(N-|Mu|)],[k,1$(N-k)])^p over all k from 1 to N #for N from 1 to N0 #PhiSeq([2],2,20); PhiSeq:=proc(Mu,pow,N0) local n: option remember: [seq(PHI(Mu,pow,n),n=1..N0)]: end: #Phi2Old(Mu,n,N0): Finds an explicit expression for #The sum of chiML([Mu,1$(n-|Mu|)^2],[k,1$(n-k)]) over all hook shapes with 1<=k<=n #at |Mu|. Uses N0 data points. Try: #Phi2Old([2],n,30); Phi2Old:=proc(Mu,n,N0) local gu,Mu0,i,lu,ku: option remember: if Mu=[] then RETURN(binomial(2*n-2,n-1)): fi: Mu0:=convert(Mu,`+`): gu:=PhiSeq(Mu,2,N0): gu:=[seq(gu[i]/binomial(2*(i-1),i-1),i=1..nops(gu))]: lu:=GuessRat(gu,n,Mu0+2): if lu=FAIL then RETURN(FAIL): else lu:=lu*binomial(2*n-2,n-1): fi: end: #MC1(L): the multinomial coefficient for L MC1:=proc(L) local i: for i from 1 to nops(L) do if type(L[i],integer) and L[i]<0 then RETURN(0): fi: od: convert(L,`+`)!/mul(L[i]!,i=1..nops(L)): end: #Phi2Vold(Mu,n,N0,i,F): Verbose version of Phi2(Mu,n,N0) (q.v), stating it as theorem Number i. Try: #Phi2Vold([2],n,30,1,F); Phi2Vold:=proc(Mu,n,N0,i,F) local Mu0,gu,k,mu,PHI: Mu0:=convert(Mu,`+`): mu:=CFmuHook(Mu,n,k): if mu=FAIL then RETURN(FAIL): fi: gu:=Phi2(Mu,n,N0): if gu=FAIL then RETURN(FAIL): fi: print(``): print(`Proposition Number`, i, `: Let `, F[op(Mu)](n,k), `be the character of the symmetric group where mu is`, Mu, `with `, n-Mu0, `ones appended, `): print(`and lambda is the hook shape whose first row has length`, k, `and the remaining`, n-k, `rows are each of length 1.`): print(`Let `): print(``): print(PHI[2][n](Mu)=Sum(F[op(Mu)](n,k)^2,k=1..n)): print(``): print(`Then `, PHI[2][n](Mu), `is given by the following closed-form expression `): print(``): print(gu): print(``): print(`and in Maple format`): print(``): lprint(gu): print(``): print(`Proof: Using the fact that Symmetric Group Charcter Chi^mu(lambda) is the Coefficient of x[1]^(lambda+n-1)*...*x[n]^(lambda(n))) `): print(`in the generating function given in Macdonald's book (see the paper), it is readily seen that we have the closed form expression`): print(``): print(F[op(Mu)](n,k)=mu): print(``): print(`and in Maple format`): print(``): lprint(F[op(Mu)](n,k)=mu): print(``): print(`and the sum of its squares is a linear combination of the Vandermonde-Chu convolutions around`, binomial(2*n-2,n-1) , `and hence is a multple`): print(`of the latter by some rational function that is routinely computable (even without WZ!), and truns out to be`): print(` the one stated in the statement of the theorem. QED. `): print(``): print(`For the sake of the OEIS, here are the first`, N0 , ` terms, starting with `, n=Mu0+2): print(eval([seq(subs(n=i1,gu),i1=Mu0+2..Mu0+N0+1)])): print(``): end: #Psi2V(Mu,n,N0,i,F): Verbose version of Psi2(Mu,n,N0) (q.v), stating it as theorem Number i. Try: #Psi2V([2],n,30); Psi2V:=proc(Mu,n,N0,i,F) local Mu0,gu,k,mu,PSI,i1: Mu0:=convert(Mu,`+`): mu:=CFSmu(Mu,[n-k,k]): if mu=FAIL then RETURN(FAIL): fi: gu:=Psi2(Mu,n,N0): if gu=FAIL then RETURN(FAIL): fi: print(``): print(`Proposition Number`, i, `: Let `, F[op(Mu)](n,k), `be the character of the symmetric group where mu is`, Mu, `with `, n-Mu0, `ones appended, `): print(`and lambda is the two-rowed shape whose first row has length`, n-k, `and the second row has length`, k ): print(`Let `): print(``): print(PSI[2][n](Mu)=Sum(F[op(Mu)](n,k)^2,k=1..n/2)): print(``): print(`Then `, PSI[2][n](Mu), `is given by the following closed-form expression `): print(``): print(gu): print(``): print(`and in Maple format`): print(``): lprint(gu): print(``): print(`Proof: Using the fact that Symmetric Group Charcter Chi^mu(lambda) is the Coefficient of x[1]^(lambda+n-1)*...*x[n]^(lambda(n))) `): print(`in the generating function given in Macdonald's book (see the paper), it is readily seen that we have the closed form expression`): print(``): print(F[op(Mu)](n,k)=mu): print(``): print(`and in Maple format`): print(``): lprint(F[op(Mu)](n,k)=mu): print(``): print(`and the sum of its squares is a linear combination of the Vandermonde-Chu convolutions around`, binomial(2*n,n) , `and hence is a multple`): print(`of the latter by some rational function that is routinely computable (even without WZ!), and turns out to be`): print(` the one stated in the statement of the theorem. QED. `): print(``): print(`For the sake of the OEIS, here are the first`, N0 , ` terms, starting with `, n=Mu0+1): print(``): print(eval([seq(subs(n=i1,gu),i1=Mu0+1..Mu0+N0)])): print(``): end: #MamarPsi(K,n,N0,F): inputs a positive integer K and outputs an a article with explicit formulas for the #sum of the squares of the character of the symmetric group S_n over all two-rowed shapes #where mu is some fixed partition,Mu, and the rest are ones, for all Mu partions of K whose smallest part is at least 2. #n and F are symbols, N0 is a positive integer for data collection. For small K, N0 is good enough. #Try: #MamarPsi(4,n,30,F); MamarPsi:=proc(K,n,N0,F) local co,mu,mu1,gu,i,t0,K1: t0:=time(): co:=0: print(``): print(`Closed Form Expressions For Sum of Squares over The Characters of the Symmetric Group over two-rowed shapes`): print(`where mu has mostly 1's `): print(``): print(`By Shalosh B. Ekhad `): print(``): for K1 from 2 to K do mu:=Partition(K1): gu:=[]: for i from 1 to nops(mu) do mu1:=mu[i]: if mu1[nops(mu1)]>1 then gu:=[op(gu),mu1]: fi: od: for i from 1 to nops(gu) do co:=co+1: print(``): print(`-----------------------------------------------------`): print(``): Psi2V(gu[i],n,N0,co,F): od: od: print(``): print(`-----------------------------------------------------`): print(``): print(`This concludes this article, that took`, time()-t0, `seconds. to generate. `): end: #MamarPhi(K,n,F): inputs a positive integer K and outputs an a article with explicit formulas for the #sum of the squares of the character of the symmetric group S_n over all hook shapes with n cells #where mu is some fixed partition,Mu, and the rest are ones, for all Mu partions of K whose smallest part is at least 2. #n and F are symbols, N0 is a positive integer for data collection. For small K, N0 is good enough. #Try: #MamarPhi(4,n,F); MamarPhi:=proc(K,n,F) local co,mu,mu1,gu,i,t0,K1: t0:=time(): co:=0: print(``): print(`Closed Form Expressions For Sum of Squares over The Characters of the Symmetric Group on n elements over hook shapes with n cells`): print(`where mu has mostly 1's, and the top of mu is a partition with at most`,K, `cells. `): print(``): print(`By Shalosh B. Ekhad `): print(``): for K1 from 2 to K do mu:=Partition(K1): gu:=[]: for i from 1 to nops(mu) do mu1:=mu[i]: if mu1[nops(mu1)]>1 then gu:=[op(gu),mu1]: fi: od: for i from 1 to nops(gu) do co:=co+1: print(``): print(`-----------------------------------------------------`): print(``): Phi2V(gu[i],n,co,F): od: od: print(``): print(`-----------------------------------------------------`): print(``): print(`This concludes this article, that took`, time()-t0, `seconds. to generate. `): end: #PsiRecV(Mu,k,pow,n,N,COMP,A,i): Verbose version of PsiRec(Mu,k,pow,n,N,COMP) (q.v.). Try. #PsiRecV([2],2,2,n,N,10,A,1); PsiRecV:=proc(Mu,k,pow,n,N,COMP,A,i) local i1, Mu0,lu,a,ope,Sid: Sid:=PsiSeq(Mu,k,pow,30): Mu0:=convert(Mu,`+`): lu:=CFSmu(Mu,[seq(a[i1],i1=1..k)]): if lu=FAIL then RETURN(FAIL): fi: ope:=PsiRec(Mu,k,pow,n,N,COMP): if ope=FAIL then print(`For the case where mu is`, Mu, `with `, n-Mu0, ` ones, and the summation is over the`, pow, `power of all shapes with n cells`): print(`and at most `, k, `rows , there is no linear recurrence of ORDER+DEGREE <= `, COMP): print(`For the sake of the OEIS, here are the first`, nops(Sid), `terms, starting with `, n=Mu0): lprint(``): lprint(Sid): lprint(``): else print(``): print(`Theorem number`, i, `: Let `, A[op(Mu)](n), `be the sum of the`, pow, `powers of the values of the symmetric group characters over all`): print(`shapes with `,n+Mu0-1, `cells and at most `, k, `rows with mu equal to`, Mu, `followed by `, n-1, `ones. `): print(``): print(A[op(Mu)](n), `satisfies the following homogeneous linear recurrence of order`, degree(ope,N), `with polynomial coefficients.`): print(``): print(add(coeff(ope,N,i1)*A[op(Mu)](n+i1),i1=0..degree(ope,N))=0): print(``): print(`and in Maple format:`): print(``): lprint(add(coeff(ope,N,i1)*A[op(Mu)](n+i1),i1=0..degree(ope,N))=0): print(``): print(`Sketch of (semi-rigorous) proof:`): print(`By using the constant term expression for the character with shape`, [seq(a[i1],i1=1..k)], `and mu being`, Mu): print(`with as many as needed ones appended to make it a partition of`, add(a[i1],i1=1..k)): print(`It is (fully rigorously!) derived that that number is given by a certain closed-form expression that we spare you.`): print(`It follows by the fundamental theorem of WZ theory that the sum of the`, pow, `power of these`): print(`over all shapes`, [seq(a[i1],i1=1..k)], `that sum to `, n+Mu0-1, `satisfies SOME linear recurrence with polynomial coefficients`): print(`whose order can be easily bound. This justifies looking for such a recurrence by guessing, that nevertheless, can be`): print(`easily justified, if desired.`): print(``): print(`For the sake of the OEIS, here are the first`, nops(Sid), `terms, starting with `, n=Mu0): lprint(``): lprint(Sid): lprint(``): fi: end: #MamarRec(K,k,pow,n,COMP,A): inputs a positive integer K, a small positive integer k, # and outputs an a article with explicit linear recurrences with polynomial coefficients of #sum of the pow-th power of the character of the symmetric group S_n over all hook shapes with n cells and k rows #where mu is some fixed partition,Mu, and the rest are ones, for all Mu partions of K whose smallest part is at least 2. #over all partitions Mu of K with smallest part at least 2. #n and A are symbols, COMP is a positive integer upping the ORDER+DEGREE of the desired recurrence. #Try: #MamarRec(4,2,2,n,10,A); MamarRec:=proc(K,k,pow,n,COMP,A) local co,mu,mu1,gu,i,t0,N,K1: t0:=time(): co:=0: print(``): print(`Linear Recurrences For the Sums of the `, pow, ` Power over The Characters of the Symmetric Group on n elements over shapes with n cells`): print(` and `, k, `rows, where mu is mostly 1's, where the non-one part of mu is a partition with at most `,K, ` cells. `): print(``): print(`By Shalosh B. Ekhad `): print(``): for K1 from 2 to K do mu:=Partition(K1): gu:=[]: for i from 1 to nops(mu) do mu1:=mu[i]: if mu1[nops(mu1)]>1 then gu:=[op(gu),mu1]: fi: od: for i from 1 to nops(gu) do co:=co+1: print(``): print(`-----------------------------------------------------`): print(``): PsiRecV(gu[i],k,pow,n,N,COMP,A,co): od: od: print(``): print(`-----------------------------------------------------`): print(``): print(`This concludes this article, that took`, time()-t0, `seconds. to generate. `): end: #Kulam(Mu,n,pow): The sum of the pow-th power of all chiML(M,L) where M is Mu with n-|Mu| 1's appended, and L range over #all shapes with n cells. Try: #Kulam([],10,2); Kulam:=proc(Mu,n,pow) local gu,mu,Mu0,i1: Mu0:=convert(Mu,`+`): if n=k>=|Mu|. Done directly, by "guessing". Try: #CFmuHookOperD([2],n,K); CFmuHookOperD:=proc(Mu,K) local n,gu,eq,var,a,i,Mu0,k1,n1,k,Oper: option remember: Mu0:=convert(Mu,`+`): var:={seq(a[i],i=1..Mu0+1)}: gu:=add(a[i]*binomial(n-1-Mu0,k-i),i=1..Mu0+1): Oper:=add(a[i]*K^i,i=1..Mu0+1): eq:={seq(seq(eval(subs({n=n1,k=k1},gu))-chiML([op(Mu),1$(n1-Mu0)],[k1,1$(n1-k1)]), k1=n1-Mu0..n1),n1=Mu0+1..Mu0+2)}: var:=solve(eq,var): if var=NULL then RETURN(FAIL): fi: factor(subs(var,Oper)/K): end: #CFmuHook(Mu,n,k): a closed-form expression for chiML([Mu,1$(n-|Mu|)],[k,1$(n-k]) #for n>=k>=|Mu|. Try: #CFmuHook([2],n,k); CFmuHook:=proc(Mu,n,k) local K,Mu0,ope,i: option remember: Mu0:=convert(Mu,`+`): ope:=expand(CFmuHookOper(Mu,K)): add(coeff(ope,K,i)*binomial(n-1-Mu0,k-1-i),i=0..degree(ope,K)): end: #CFmuHookOper(Mu,K): The recurrence operator, in K, (the NEGATIVE shift operator in k) #such that applying it to binomial(n-1,k) gives chiML([Mu,1$(n-|Mu|)],[k,1$(n-k]) #for n>=k>=|Mu|. Try: #CFmuHookOper([2],n,K); CFmuHookOper:=proc(Mu,K) local gu,i: option remember: mul(K^Mu[i]-(-1)^Mu[i],i=1..nops(Mu)): end: #CFmuHookGF(Mu,n,x): The generating function whose coefficient of x^k is chiML([Mu,1$(n-|Mu|)],[k,1$(n-k])) #for n>=k>=|Mu|. n can be numeric or symbolic. Try: #CFmuHookGF([2],n,x); CFmuHookGF:=proc(Mu,n,x) : CFmuHookOper(Mu,x)*(1+x)^(n-1-convert(Mu,`+`))*x: end: #CFmuHookNew(Mu,n,k): a closed-form expression for chiML([Mu,1$(n-|Mu|)],[k,1$(n-k]) #for n>=k>=|Mu|. Try: #CFmuHookNew([2],n,k); CFmuHookNew:=proc(Mu,n,k) local x: coeff(CFmuHookGF(Mu,n,x),x,k): end: #Phi2(Mu,n): Finds an explicit expression for #The sum of chiML([Mu,1$(n-|Mu|)^2],[k,1$(n-k)]) over all hook shapes with 1<=k<=n #at |Mu|. #Phi2([2],n,30); Phi2:=proc(Mu,n) local x,gu,Mu0,i,lu: gu:=mul(x^Mu[i]-(-1)^Mu[i],i=1..nops(Mu)): gu:=expand(gu*subs(x=1/x,gu)): Mu0:=convert(Mu,`+`): lu:=binomial(2*(n-1),n-1): factor(add(coeff(gu,x,i)*expand(binomial(2*(n-1-Mu0),n-1-Mu0-i)/lu),i=ldegree(gu,x)..degree(gu,x)))*lu: end: #Phi2V(Mu,n,i,F): Verbose version of Phi2(Mu,n) (q.v), stating it as theorem Number i. Try: #Phi2V([2],n,1,F); Phi2V:=proc(Mu,n,i,F) local Mu0,gu,k,mu,PHI,x,ku,i1: Mu0:=convert(Mu,`+`): mu:=CFmuHook(Mu,n,k): if mu=FAIL then RETURN(FAIL): fi: gu:=Phi2(Mu,n): print(``): print(`Proposition Number`, i, `: Let `, F[op(Mu)](n,k), `be the character of the symmetric group where mu is`, Mu, `with `, n-Mu0, `ones appended, `): print(`and lambda is the hook shape whose first row has length`, k, `and the remaining`, n-k, `rows are each of length 1.`): print(`Let `): print(``): print(PHI[2][n](Mu)=Sum(F[op(Mu)](n,k)^2,k=1..n)): print(``): print(`Then `, PHI[2][n](Mu), `is given by the following closed-form expression `): print(``): print(gu): print(``): print(`and in Maple format`): print(``): lprint(gu): print(``): print(`Proof: Using the fact that Symmetric Group Charcter Chi^mu(lambda) is the Coefficient of x[1]^(lambda+n-1)*...*x[n]^(lambda(n))) `): print(`in the generating function given in Macdonald's book (see the paper), it is readily seen that we have the closed form expression`): print(``): print(F[op(Mu)](n,k)=mu): print(``): print(`and in Maple format`): print(``): lprint(F[op(Mu)](n,k)=mu): print(``): ku:=CFmuHookOper(Mu,x): print(`Its generating function, in`, x, `with respect to k is readily seen to be`): print(``): print(ku*(1+x)^(n-1-convert(Mu,`+`))*x): print(``): print(`and in Maple format`): print(``): lprint(ku*(1+x)^(n-1-convert(Mu,`+`))*x): print(``): print(`hence the sum of the squares of its coefficient is the constant term of`): print(ku*subs(x=1/x,ku)): print(`times `): print((1+x)^(2*(n-1-convert(Mu,`+`)))/x^(n-1-convert(Mu,`+`))): ku:=expand(ku*subs(x=1/x,ku)): print(``): print(`expanding the former, we get`): print(ku): print(`times `): print((1+x)^(2*(n-1-convert(Mu,`+`)))/x^(n-1-convert(Mu,`+`))): print(``): print(`collecting coefficients, we get`): print(``): print(add(coeff(ku,x,i1)*binomial(2*(n-1-Mu0),n-1-Mu0-i1),i1=ldegree(ku,x)..degree(ku,x))): print(``): print(`and in Maple format`): print(``): lprint(add(coeff(ku,x,i1)*binomial(2*(n-1-Mu0),n-1-Mu0-i1),i1=ldegree(ku,x)..degree(ku,x))): print(``): print(`and this simplifies to the claimed expression. `): end: #CFmu2Rows(Mu,n,j): The closed-form expression for ChiRL([Mu,1^(n-|Mu|)],[n-j,j]). Try: #CFmu2Rows([2,2],n,j); CFmu2Rows:=proc(Mu,n,j) local x,y,i,gu,gu1,lu,coe,dar,Mu0: option remember: Mu0:=convert(Mu,`+`): gu:=expand((1-y/x)*mul(x^Mu[i]+y^Mu[i],i=1..nops(Mu))): if not type(gu,`+`) then RETURN(FAIL): fi: lu:=0: for i from 1 to nops(gu) do gu1:=op(i,gu): dar:=[degree(gu1,x),degree(gu1,y)]: coe:=normal(gu1/x^dar[1]/y^dar[2]): if not type(coe,integer) then RETURN(FAIL): fi: lu:=lu+coe*binomial(n-Mu0,j-dar[2]): od: lu: end: #CFmu2RowsGF(Mu,t): The polynomial multipliying (1-x)*(1+x)^(n-|Mu]) to produce the generating function whose coefficient of t^j is #CFmu2Rows([2,2],n,j). Try: CFmu2RowsGF([3],x); CFmu2RowsGF:=proc(Mu,t) local x,y,i,gu,gu1,lu,coe,dar: option remember: gu:=expand((1-y/x)*mul(x^Mu[i]+y^Mu[i],i=1..nops(Mu))): if not type(gu,`+`) then RETURN(FAIL): fi: lu:=0: for i from 1 to nops(gu) do gu1:=op(i,gu): dar:=[degree(gu1,x),degree(gu1,y)]: coe:=normal(gu1/x^dar[1]/y^dar[2]): if not type(coe,integer) then RETURN(FAIL): fi: lu:=lu+t^dar[2]: od: factor(lu): end: #Yakhas(mu1,mu2,n,r): inputs partitions mu1,mu2, a symbol n, and a (small) integer n, outputs #Psi2(mu1,n,N)/subs(n=n+r,Phi2(mu2,n)). For example, try: #Yakhas([3],[3,2],n,2,30); Yakhas:=proc(mu1,mu2,n,r,K) local gu1,gu2,lu: gu1:=convert(Psi2(mu1,n,K),factorial): gu2:=convert(Phi2(mu2,n,K),factorial): gu2:=subs(n=n+r,gu2): lu:=factor(normal(simplify(gu1/gu2))): lu: end: #Par2(n): the set of partitions of n whose smallest part is >=2. Try: #Par2(10); Par2:=proc(n) local mu,mu1,gu: mu:=Partition(n): gu:={}: for mu1 in mu do if mu1[nops(mu1)]>1 then gu:=gu union {mu1}: fi: od: gu: end: #NisimC(K,L,N0): inputs a positive integer K, a postive integer L, and a fairly large positive integer N0 #outputs the set of pairs [[mu1,mu2,r],ratio] such that ratio:=Yakhas(mu1,mu2,n,r,N0) is a constant, where #mu1,mu2 are partitions with smallest part>=2 of an integer <=K, and abs(r)<=L. For example, try: #NisimC(5,2,30); NisimC:=proc(K,L,N0) local n,i,mu,mu1,mu2, r, gu,lu: mu:={seq(op(Par2(i)),i=2..K)}: gu:={}: for mu1 in mu do for mu2 in mu do for r from -L to L do lu:=Yakhas(mu1,mu2,n,r,N0): if type(lu,numeric) then gu:=gu union {[[mu1,mu2,r],lu]}: fi: od: od: od: gu: end: #NisimC1(K,N0): inputs a positive integer K, and a fairly large positive integer N0 #outputs the set of pairs [[mu1,mu2],ratio] such that ratio:=Yakhas(mu1,mu2,2,n,N0) is a constant, where #mu1 is partition of K and mu2 a partition of K+2 with smallest parts>=2 #NisimC1(5,30); NisimC1:=proc(K,N0) local n,mu1,mu2, mu11, mu21, gu,lu: mu1:=Par2(K): mu2:=Par2(K+2): gu:={}: for mu11 in mu1 do for mu21 in mu2 do lu:=Yakhas(mu11,mu21,n,2,N0): if type(lu,numeric) then gu:=gu union {[[mu11,mu21],lu]}: fi: od: od: gu: end: #SeferNisim(K,N0): all the pairs [mu1,mu2,const] with |mu1|<=K, |mu2|=|mu1|+2 such that #Psi2(mu1,n,N)/subs(n=n+r,Phi2(mu2,n)) is const. Try: #SeferSisim(6,40); SeferNisim:=proc(K,N0) local K1,t0: t0:=time(): print(`The following is the list of pairs of partitions [mu1,mu2] such that `): print(`Psi2(mu1,n,N)/subs(n=n+2,Phi2(mu2,n)) is a constant, followed by that constant `): print(`that happens to be 1/2 so far`): for K1 from 2 to K do print(``): lprint(`if mu1 and mu2 are, respectively partions of`, K1, `and `, K1+2, `we have the following pairs`): print(``): lprint(NisimC1(K1,N0)): print(``): od: print(`This took`, time()-t0, `seconds. `): end: #CheckN1(k): checks Conjecture 1 that [2*k+1] and [2*k+1,2] are equivalent CheckN1:=proc(k,N0) local n: evalb(Yakhas([2*k+1],[2*k+1,2],n,2,N0)=1/2): end: #CheckN2(k): checks Conjecture 2 that [2*k+1,3] and [2*k+1,3,2] are equivalent CheckN2:=proc(k,N0) local n: evalb(Yakhas([2*k+1,3],[2*k+1,3,2],n,2,N0)=1/2): end: #AlexMiller(n): All the partial sums of the rows of the character table of Sn AlexMiller:=proc(n) local lu,k,i,j: lu:=partition(n): [seq([seq(add(Chi(lu[i],lu[j]),j=1..k),k=1..nops(lu))],i=1..nops(lu))]: end: #CheckAlexMiller: Checks Alexander Rossi Miller's conjecture for n CheckAlexMiller:=proc(n) local lu,k,i,j: lu:=partition(n): evalb({seq(seq( evalb(add(Chi(lu[i],lu[j]),j=1..k)>=0),k=1..nops(lu)),i=1..nops(lu))}={true}): end: