免費論壇 繁體 | 簡體
Sclub交友聊天~加入聊天室當版主
分享
返回列表 发帖

考虑顺序且指定加数的整数分拆

  1. Plus[Permutations[{2, 2, 3, 3}] // Length,
  2. Permutations[{2, 2, 2, 2, 2}] // Length,
  3. Permutations[{1, 3, 3, 3}] // Length,
  4. Permutations[{1, 2, 2, 2, 3}] // Length,
  5. Permutations[{1, 1, 2, 3, 3}] // Length,
  6. Permutations[{1, 1, 2, 2, 2, 2}] // Length,
  7. Permutations[{1, 1, 1, 2, 2, 3}] // Length,
  8. Permutations[{1, 1, 1, 1, 3, 3}] // Length,
  9. Permutations[{1, 1, 1, 1, 2, 2, 2}] // Length,
  10. Permutations[{1, 1, 1, 1, 1, 2, 3}] // Length,
  11. Permutations[{1, 1, 1, 1, 1, 1, 2, 2}] // Length,
  12. Permutations[{1, 1, 1, 1, 1, 1, 1, 3}] // Length,
  13. Permutations[{1, 1, 1, 1, 1, 1, 1, 1, 2}] // Length,
  14. Permutations[{1, 1, 1, 1, 1, 1, 1, 1, 1, 1}] // Length]
复制代码
比如:\(10=1+2+2+2+3\)和\(10=1+2+2+3+2\)是两种不同的分拆
分享到: QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友

为什么不加上 Permutations[{9,1}]、Permutations[{8,1,1}] 这些?原题到底怎么描述的,你倒是说清楚点啊

TOP

回复 2# kuing
所以说是指定加数的整数分拆呀
只许用1,2,3来表示10的有序整数分拆

TOP

回复 3# 青青子衿

那也容易,即 `(x+x^2+x^3)^4+(x+x^2+x^3)^5+\cdots+(x+x^2+x^3)^{10}` 中 `x^{10}` 的系数,用MMC一行搞定:
  1. Coefficient[Sum[(x + x^2 + x^3)^i, {i, 4, 10}], x^10]
复制代码
和你1#得出的结果一样,都是 274

TOP

回复 4# kuing
再贴一段MMA代码:
IntegerPartitions[10, All, {1, 2, 3}] // Column
Length /@ Permutations /@ IntegerPartitions[10, All, {1, 2, 3}]
Length /@ Permutations /@ IntegerPartitions[10, All, {1, 2, 3}] // Total

TOP

返回列表 回复 发帖