HelpOld:=proc(): print(`Par(n), Par1(n,k), GuessPol(L,n) `): print(` Mamas(n), f(L), Guess2(a,b1) , Guess3(a,b1,c1) `): end: Help:=proc(): print(`Children(L), Nes1(L), Nes(L) `): print(`Y(n,k), SeqY(n,k), Yr(n,k,r), SeqYr(n,k,r) , F(L)`): end: #Par(n): the set of integer-partitions of n Par:=proc(n) local k: option remember: {seq( op(Par1(n,k)),k=1..n)}: end: #Par1(n,k): the set of partitions of n whose #largest part is k Par1:=proc(n,k) local k1,beth,b,S: option remember: if n=1 then if k=1 then RETURN({[1]}): else RETURN({}): fi: fi: if n=k then RETURN({[n]}): fi: if k<=0 or k>n then RETURN({}): fi: S:={}: for k1 from 1 to k do beth:=Par1(n-k,k1): S:=S union {seq([k,op(b)], b in beth)}: od: S: end: #par(n): the number of integer-partitions of n par:=proc(n) local k: option remember: add(par1(n,k),k=1..n): end: #par1(n,k): the number of partitions of n whose #largest part is k par1:=proc(n,k) local S,k1: option remember: if n=1 then if k=1 then RETURN(1): else RETURN(0): fi: fi: if n=k then RETURN(1): fi: if k<=0 or k>n then RETURN(0): fi: add(par1(n-k,k1),k1=1..k): end: #GuessPol1(L,d,n): 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) local P,i,a,eq,var: if d>=nops(L)-3 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=1..d+4)}: var:=solve(eq,var): if var=NULL then RETURN(FAIL): fi: subs(var,P): end: #GuessPol(L,n): guesses a polynomial of degree d in n for # the list L, such that L[i]=P[i] for i>=1 for example, try: #GuessPol([(seq(i,i=1..10),n); GuessPol:=proc(L,n) local d,gu: for d from 0 to nops(L)-4 do gu:=GuessPol1(L,d,n): if gu<>FAIL then RETURN(factor(gu)): fi: od: FAIL: end: #Mamas(L): all the shapes obtained from L by #nibbling a corner Mamas:=proc(L) local i,k,S: if L=[] then RETURN({}): fi: S:={}: k:=nops(L): for i from 1 to k-1 do if L[i]>L[i+1] then S:=S union {[op(1..i-1,L),L[i]-1,op(i+1..k,L)]}: fi: od: if L[k]>=2 then S:=S union {[op(1..k-1,L),L[k]-1]}: else S:=S union {[op(1..k-1,L)]}: fi: S: end: f:=proc(L) local S,s: option remember: if L=[] then RETURN(1): fi: S:=Mamas(L): add(f(s), s in S): end: #Guess2(a,b1): guesses a poly. expression in a #for the number of 2-rowed Young tableaux whose #bottom row has b1 boxes #(b1 pos. integer, a a symbol) Guess2:=proc(a,b1) local a1: subs(a=a-(b1-1), GuessPol([seq(f([a1,b1]),a1=b1..2*b1+5)],a)): end: #Guess3(a,b1,c1): guesses a poly. expression in a #for the number of 3-rowed Young tableaux whose #middle row has b1 boxes and #bottom row has c1 boxes #(b1 pos. integer,c1, b1>=c1, a a symbol) Guess3:=proc(a,b1,c1) local a1: if b1L[i] then S:=S union { [op(1..i-1,L), L[i]+1, op(i+1..nops(L),L)]}: fi: od: S:=S union {[op(L),1]}: S: end: #Nes1(L): the ratio of Sum(f(L1), L1 child of L) and f(L) #for a partition L Nes1:=proc(L) local i,C: C:=Children(L): add(f(brian),brian in C)/f(L): end: Nes:=proc(n) local S: S:=Par(n): {seq(evalb(Nes1(s)=n+1), s in S)}: end: NES:=proc(N) local n: evalb({seq(evalb(Nes(n)={true}),n=1..N)}={true}) : end: #NES is verifying the GOING-UP RECURRENCE # (n+1) f(L)= Sum(f(L1), L1 in Children(L)) #Y(n,k): the total number of f(L)^k L in Par(n) Y:=proc(n,k) local A: A:=Par(n): add(f(L)^k, L in A): end: #SeqY(N,k): the sequence of Y(n,k) for n=1.. N SeqY:=proc(N,k) local n: [seq(Y(n,k),n=1..N)]:end: #Yr(n,k,r): the total number of f(L)^k L in Par1(n,k) Yr:=proc(n,k,r) local L: add( add(f(L)^k, L in Par1(n,r1)) ,r1=1..r ): end: #SeqY(N,k): the sequence of Y(n,k) for n=1.. N SeqYr:=proc(N,k,r) local n: [seq(Yr(n,k,r),n=1..N)]:end: #F(L):the set of Stan. YT of shape L F:=proc(L) local S,s,S1,A: option remember: if L=[] then RETURN({[]}): fi: A:={}: end: