|
SOLUTIONS
|
MATHEMATICA 内置符号
IntegerPartitions
IntegerPartitions[n]
给出把整数 n 划分成一系列较小的整数的所有可能的方法.
IntegerPartitions[n, k]
给出最多划分成 k 个整数.
IntegerPartitions[n, {k}]
给出精确的划分成 k 个整数.
IntegerPartitions[n, {kmin, kmax}]
给出在
和
两个整数之间划分.
IntegerPartitions[n, kspec, {s1, s2, ...}]
给出只包括
的划分.
IntegerPartitions[n, kspec, sspec, m]
给出第一个 m 划分.
更多信息更多信息
- 从 IntegerPartitions 得到的结果,通常会以与词典顺序相反的顺序给出.
- Length[IntegerPartitions[n]] 是 PartitionsP[n].
- IntegerPartitions[n] 等价于 IntegerPartitions[n, All].
- IntegerPartitions[n, {kmin, kmax, dk}] 给出
、
、... 整数的划分. - 如果
是有理数,n 是有理数. - 在划分的列表中,那些较早的
最后给出. - IntegerPartitions[n, kspec, sspec, -m] 将结果限制在最后的 m 划分.
- 在
中,All 的 kspec 对应于 {0, Infinity};All 的 sspec 对应于 Range[n];All 的 m 对应于 Infinity.
版本 6 的新功能 | 版本 7 修改功能
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
