以7为例:
- Table[s=Select[IntegerPartitions[n,{4}],#[[3]]+#[[4]]>=#[[1]]>#[[2]]>#[[3]]>#[[4]]&];{n,Length@s,s},{n,50}]//MatrixForm
复制代码
1 0 {}
2 0 {}
3 0 {}
4 0 {}
5 0 {}
6 0 {}
7 0 {}
8 0 {}
9 0 {}
10 0 {}
11 0 {}
12 0 {}
13 0 {}
14 1 {{5,4,3,2}}
15 0 {}
16 0 {}
17 1 {{6,5,4,2}}
18 1 {{6,5,4,3}}
19 1 {{7,5,4,3}}
20 2 {{7,6,5,2},{7,6,4,3}}
21 1 {{7,6,5,3}}
22 2 {{8,6,5,3},{7,6,5,4}}
23 3 {{8,7,6,2},{8,7,5,3},{8,6,5,4}}
24 3 {{9,6,5,4},{8,7,6,3},{8,7,5,4}}
25 3 {{9,7,6,3},{9,7,5,4},{8,7,6,4}}
26 5 {{9,8,7,2},{9,8,6,3},{9,8,5,4},{9,7,6,4},{8,7,6,5}}
27 4 {{10,7,6,4},{9,8,7,3},{9,8,6,4},{9,7,6,5}}
28 5 {{10,8,7,3},{10,8,6,4},{10,7,6,5},{9,8,7,4},{9,8,6,5}}
29 7 {{11,7,6,5},{10,9,8,2},{10,9,7,3},{10,9,6,4},{10,8,7,4},{10,8,6,5},{9,8,7,5}}
30 7 {{11,8,7,4},{11,8,6,5},{10,9,8,3},{10,9,7,4},{10,9,6,5},{10,8,7,5},{9,8,7,6}}
31 7 {{11,9,8,3},{11,9,7,4},{11,9,6,5},{11,8,7,5},{10,9,8,4},{10,9,7,5},{10,8,7,6}}
32 10 {{12,8,7,5},{11,10,9,2},{11,10,8,3},{11,10,7,4},{11,10,6,5},{11,9,8,4},{11,9,7,5},{11,8,7,6},{10,9,8,5},{10,9,7,6}}
33 9 {{12,9,8,4},{12,9,7,5},{12,8,7,6},{11,10,9,3},{11,10,8,4},{11,10,7,5},{11,9,8,5},{11,9,7,6},{10,9,8,6}}
34 11 {{13,8,7,6},{12,10,9,3},{12,10,8,4},{12,10,7,5},{12,9,8,5},{12,9,7,6},{11,10,9,4},{11,10,8,5},{11,10,7,6},{11,9,8,6},{10,9,8,7}}
35 13 {{13,9,8,5},{13,9,7,6},{12,11,10,2},{12,11,9,3},{12,11,8,4},{12,11,7,5},{12,10,9,4},{12,10,8,5},{12,10,7,6},{12,9,8,6},{11,10,9,5},{11,10,8,6},{11,9,8,7}}
36 13 {{13,10,9,4},{13,10,8,5},{13,10,7,6},{13,9,8,6},{12,11,10,3},{12,11,9,4},{12,11,8,5},{12,11,7,6},{12,10,9,5},{12,10,8,6},{12,9,8,7},{11,10,9,6},{11,10,8,7}}
37 14 {{14,9,8,6},{13,11,10,3},{13,11,9,4},{13,11,8,5},{13,11,7,6},{13,10,9,5},{13,10,8,6},{13,9,8,7},{12,11,10,4},{12,11,9,5},{12,11,8,6},{12,10,9,6},{12,10,8,7},{11,10,9,7}}
38 18 {{14,10,9,5},{14,10,8,6},{14,9,8,7},{13,12,11,2},{13,12,10,3},{13,12,9,4},{13,12,8,5},{13,12,7,6},{13,11,10,4},{13,11,9,5},{13,11,8,6},{13,10,9,6},{13,10,8,7},{12,11,10,5},{12,11,9,6},{12,11,8,7},{12,10,9,7},{11,10,9,8}}
39 17 {{15,9,8,7},{14,11,10,4},{14,11,9,5},{14,11,8,6},{14,10,9,6},{14,10,8,7},{13,12,11,3},{13,12,10,4},{13,12,9,5},{13,12,8,6},{13,11,10,5},{13,11,9,6},{13,11,8,7},{13,10,9,7},{12,11,10,6},{12,11,9,7},{12,10,9,8}}
40 19 {{15,10,9,6},{15,10,8,7},{14,12,11,3},{14,12,10,4},{14,12,9,5},{14,12,8,6},{14,11,10,5},{14,11,9,6},{14,11,8,7},{14,10,9,7},{13,12,11,4},{13,12,10,5},{13,12,9,6},{13,12,8,7},{13,11,10,6},{13,11,9,7},{13,10,9,8},{12,11,10,7},{12,11,9,8}}
41 22 {{15,11,10,5},{15,11,9,6},{15,11,8,7},{15,10,9,7},{14,13,12,2},{14,13,11,3},{14,13,10,4},{14,13,9,5},{14,13,8,6},{14,12,11,4},{14,12,10,5},{14,12,9,6},{14,12,8,7},{14,11,10,6},{14,11,9,7},{14,10,9,8},{13,12,11,5},{13,12,10,6},{13,12,9,7},{13,11,10,7},{13,11,9,8},{12,11,10,8}}
42 23 {{16,10,9,7},{15,12,11,4},{15,12,10,5},{15,12,9,6},{15,12,8,7},{15,11,10,6},{15,11,9,7},{15,10,9,8},{14,13,12,3},{14,13,11,4},{14,13,10,5},{14,13,9,6},{14,13,8,7},{14,12,11,5},{14,12,10,6},{14,12,9,7},{14,11,10,7},{14,11,9,8},{13,12,11,6},{13,12,10,7},{13,12,9,8},{13,11,10,8},{12,11,10,9}}
43 24 {{16,11,10,6},{16,11,9,7},{16,10,9,8},{15,13,12,3},{15,13,11,4},{15,13,10,5},{15,13,9,6},{15,13,8,7},{15,12,11,5},{15,12,10,6},{15,12,9,7},{15,11,10,7},{15,11,9,8},{14,13,12,4},{14,13,11,5},{14,13,10,6},{14,13,9,7},{14,12,11,6},{14,12,10,7},{14,12,9,8},{14,11,10,8},{13,12,11,7},{13,12,10,8},{13,11,10,9}}
44 29 {{17,10,9,8},{16,12,11,5},{16,12,10,6},{16,12,9,7},{16,11,10,7},{16,11,9,8},{15,14,13,2},{15,14,12,3},{15,14,11,4},{15,14,10,5},{15,14,9,6},{15,14,8,7},{15,13,12,4},{15,13,11,5},{15,13,10,6},{15,13,9,7},{15,12,11,6},{15,12,10,7},{15,12,9,8},{15,11,10,8},{14,13,12,5},{14,13,11,6},{14,13,10,7},{14,13,9,8},{14,12,11,7},{14,12,10,8},{14,11,10,9},{13,12,11,8},{13,12,10,9}}
45 28 {{17,11,10,7},{17,11,9,8},{16,13,12,4},{16,13,11,5},{16,13,10,6},{16,13,9,7},{16,12,11,6},{16,12,10,7},{16,12,9,8},{16,11,10,8},{15,14,13,3},{15,14,12,4},{15,14,11,5},{15,14,10,6},{15,14,9,7},{15,13,12,5},{15,13,11,6},{15,13,10,7},{15,13,9,8},{15,12,11,7},{15,12,10,8},{15,11,10,9},{14,13,12,6},{14,13,11,7},{14,13,10,8},{14,12,11,8},{14,12,10,9},{13,12,11,9}}
46 31 {{17,12,11,6},{17,12,10,7},{17,12,9,8},{17,11,10,8},{16,14,13,3},{16,14,12,4},{16,14,11,5},{16,14,10,6},{16,14,9,7},{16,13,12,5},{16,13,11,6},{16,13,10,7},{16,13,9,8},{16,12,11,7},{16,12,10,8},{16,11,10,9},{15,14,13,4},{15,14,12,5},{15,14,11,6},{15,14,10,7},{15,14,9,8},{15,13,12,6},{15,13,11,7},{15,13,10,8},{15,12,11,8},{15,12,10,9},{14,13,12,7},{14,13,11,8},{14,13,10,9},{14,12,11,9},{13,12,11,10}}
47 35 {{18,11,10,8},{17,13,12,5},{17,13,11,6},{17,13,10,7},{17,13,9,8},{17,12,11,7},{17,12,10,8},{17,11,10,9},{16,15,14,2},{16,15,13,3},{16,15,12,4},{16,15,11,5},{16,15,10,6},{16,15,9,7},{16,14,13,4},{16,14,12,5},{16,14,11,6},{16,14,10,7},{16,14,9,8},{16,13,12,6},{16,13,11,7},{16,13,10,8},{16,12,11,8},{16,12,10,9},{15,14,13,5},{15,14,12,6},{15,14,11,7},{15,14,10,8},{15,13,12,7},{15,13,11,8},{15,13,10,9},{15,12,11,9},{14,13,12,8},{14,13,11,9},{14,12,11,10}}
48 36 {{18,12,11,7},{18,12,10,8},{18,11,10,9},{17,14,13,4},{17,14,12,5},{17,14,11,6},{17,14,10,7},{17,14,9,8},{17,13,12,6},{17,13,11,7},{17,13,10,8},{17,12,11,8},{17,12,10,9},{16,15,14,3},{16,15,13,4},{16,15,12,5},{16,15,11,6},{16,15,10,7},{16,15,9,8},{16,14,13,5},{16,14,12,6},{16,14,11,7},{16,14,10,8},{16,13,12,7},{16,13,11,8},{16,13,10,9},{16,12,11,9},{15,14,13,6},{15,14,12,7},{15,14,11,8},{15,14,10,9},{15,13,12,8},{15,13,11,9},{15,12,11,10},{14,13,12,9},{14,13,11,10}}
49 38 {{19,11,10,9},{18,13,12,6},{18,13,11,7},{18,13,10,8},{18,12,11,8},{18,12,10,9},{17,15,14,3},{17,15,13,4},{17,15,12,5},{17,15,11,6},{17,15,10,7},{17,15,9,8},{17,14,13,5},{17,14,12,6},{17,14,11,7},{17,14,10,8},{17,13,12,7},{17,13,11,8},{17,13,10,9},{17,12,11,9},{16,15,14,4},{16,15,13,5},{16,15,12,6},{16,15,11,7},{16,15,10,8},{16,14,13,6},{16,14,12,7},{16,14,11,8},{16,14,10,9},{16,13,12,8},{16,13,11,9},{16,12,11,10},{15,14,13,7},{15,14,12,8},{15,14,11,9},{15,13,12,9},{15,13,11,10},{14,13,12,10}}
50 44 {{19,12,11,8},{19,12,10,9},{18,14,13,5},{18,14,12,6},{18,14,11,7},{18,14,10,8},{18,13,12,7},{18,13,11,8},{18,13,10,9},{18,12,11,9},{17,16,15,2},{17,16,14,3},{17,16,13,4},{17,16,12,5},{17,16,11,6},{17,16,10,7},{17,16,9,8},{17,15,14,4},{17,15,13,5},{17,15,12,6},{17,15,11,7},{17,15,10,8},{17,14,13,6},{17,14,12,7},{17,14,11,8},{17,14,10,9},{17,13,12,8},{17,13,11,9},{17,12,11,10},{16,15,14,5},{16,15,13,6},{16,15,12,7},{16,15,11,8},{16,15,10,9},{16,14,13,7},{16,14,12,8},{16,14,11,9},{16,13,12,9},{16,13,11,10},{15,14,13,8},{15,14,12,9},{15,14,11,10},{15,13,12,10},{14,13,12,11}} |