editing
approved
editing
approved
H:=proc(pa) local F, j, p, Q, i, col, a, A: F:=proc(x) local i, ct: ct:=0: for i from 1 to nops(x) do if x[i]>1 then ct:=ct+1 else fi od: ct; end: for j from 1 to nops(pa) do p[1][j]:=pa[j] od: Q[1]:=[seq(p[1][j], j=1..nops(pa))]: for i from 2 to pa[1] do for j from 1 to F(Q[i-1]) do p[i][j]:=Q[i-1][j]-1 od: Q[i]:=[seq(p[i][j], j=1..F(Q[i-1]))] od: for i from 1 to pa[1] do col[i]:=[seq(Q[i][j]+ nops(Q[i])-j, j=1..nops(Q[i]))] od: a:=proc(i, j) if i<=nops(Q[j]) and j<=pa[1] then Q[j][i]+nops(Q[j])-i else 1 fi end: A:=matrix(nops(pa), pa[1], a): product(product(A[m, n], n=1..pa[1]), m=1..nops(pa)); end: with(combinat): rev:=proc(a) [seq(a[nops(a)+1-i], i=1..nops(a))] end: seq(sort([seq(H(rev(partition(j)[i])), i=1..numbpart(j))])[1], j=1..30); # the procedure H gives the hook product for a given partition written with parts in nonincreasing order; # if in the definition of the procedure a we replace "else 1" by "else x", then the matrix A yields all the hooklengths corresponding to a partition. # Emeric Deutsch, May 12 2004
# Maple code from Emeric Deutsch, May 12 2004 (Start)
H:=proc(pa) local F, j, p, Q, i, col, a, A: F:=proc(x) local i, ct: ct:=0: for i from 1 to nops(x) do if x[i]>1 then ct:=ct+1 else fi od: ct; end:
for j from 1 to nops(pa) do p[1][j]:=pa[j] od: Q[1]:=[seq(p[1][j], j=1..nops(pa))]:
for i from 2 to pa[1] do for j from 1 to F(Q[i-1]) do p[i][j]:=Q[i-1][j]-1 od:
Q[i]:=[seq(p[i][j], j=1..F(Q[i-1]))] od:
for i from 1 to pa[1] do col[i]:=[seq(Q[i][j]+ nops(Q[i])-j, j=1..nops(Q[i]))] od:
a:=proc(i, j) if i<=nops(Q[j]) and j<=pa[1] then Q[j][i]+nops(Q[j])-i else 1 fi end:
A:=matrix(nops(pa), pa[1], a): product(product(A[m, n], n=1..pa[1]), m=1..nops(pa)); end:
with(combinat):
rev:=proc(a) [seq(a[nops(a)+1-i], i=1..nops(a))] end:
seq(sort([seq(H(rev(partition(j)[i])), i=1..numbpart(j))])[1], j=1..30);
# the procedure H gives the hook product for a given partition written with parts in nonincreasing order;
# if in the definition of the procedure a we replace "else 1" by "else x", then the matrix A yields all the hooklengths corresponding to a partition.
# (End)
approved
editing
proposed
approved
editing
proposed
H:=proc(pa) local F, j, p, Q, i, col, a, A: F:=proc(x) local i, ct: ct:=0: for i from 1 to nops(x) do if x[i]>1 then ct:=ct+1 else fi od: ct; end: for j from 1 to nops(pa) do p[1][j]:=pa[j] od: Q[1]:=[seq(p[1][j], j=1..nops(pa))]: for i from 2 to pa[1] do for j from 1 to F(Q[i-1]) do p[i][j]:=Q[i-1][j]-1 od: Q[i]:=[seq(p[i][j], j=1..F(Q[i-1]))] od: for i from 1 to pa[1] do col[i]:=[seq(Q[i][j]+ nops(Q[i])-j, j=1..nops(Q[i]))] od: a:=proc(i, j) if i<=nops(Q[j]) and j<=pa[1] then Q[j][i]+nops(Q[j])-i else 1 fi end: A:=matrix(nops(pa), pa[1], a): product(product(A[m, n], n=1..pa[1]), m=1..nops(pa)); end: with(combinat): rev:=proc(a) [seq(a[nops(a)+1-i], i=1..nops(a))] end: seq(sort([seq(H(rev(partition(j)[i])), i=1..numbpart(j))])[1], j=1..30); # the procedure H gives the hook product for a given partition written with parts in nonincreasing order; # if in the definition of the procedure a we replace "else 1" by "else x", then the matrix A yields all the hooklengths corresponding to a partition. - _# _Emeric Deutsch_, May 12 2004
proposed
editing
editing
proposed
For n=4, we can have;
The hook products are 4! = 24, 4.*2.*1.*1 = 8 and 3.*2.*2.*1 = 12, so a(4) = 8. (_- _Jon Perry_)
H:=proc(pa) local F, j, p, Q, i, col, a, A: F:=proc(x) local i, ct: ct:=0: for i from 1 to nops(x) do if x[i]>1 then ct:=ct+1 else fi od: ct; end: for j from 1 to nops(pa) do p[1][j]:=pa[j] od: Q[1]:=[seq(p[1][j], j=1..nops(pa))]: for i from 2 to pa[1] do for j from 1 to F(Q[i-1]) do p[i][j]:=Q[i-1][j]-1 od: Q[i]:=[seq(p[i][j], j=1..F(Q[i-1]))] od: for i from 1 to pa[1] do col[i]:=[seq(Q[i][j]+ nops(Q[i])-j, j=1..nops(Q[i]))] od: a:=proc(i, j) if i<=nops(Q[j]) and j<=pa[1] then Q[j][i]+nops(Q[j])-i else 1 fi end: A:=matrix(nops(pa), pa[1], a): product(product(A[m, n], n=1..pa[1]), m=1..nops(pa)); end: with(combinat): rev:=proc(a) [seq(a[nops(a)+1-i], i=1..nops(a))] end: seq(sort([seq(H(rev(partition(j)[i])), i=1..numbpart(j))])[1], j=1..30); # the procedure H gives the hook product for a given partition written with parts in nonincreasing order; # if in the definition of the procedure a we replace "else 1" by "else x", then the matrix A yields all the hooklengths corresponding to a partition. (- _Emeric Deutsch)_
approved
editing
editing
approved
Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/HookLengthFormula.html">Hook Length Formula</a>
For n=4, we can have;
abcd, abc and ab (the rest are symmetric).
......d.......cd
The hook products are 4!=24, 4.2.1.1=8 and 3.2.2.1=12, so a(4)=8. (Jon Perry)
proposed
editing
editing
proposed