找回密码
 快速注册
搜索
查看: 1198|回复: 4

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

[复制链接]

471

主题

945

回帖

9837

积分

积分
9837

显示全部楼层

青青子衿 发表于 2018-8-28 22:45 |阅读模式
  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\)是两种不同的分拆

730

主题

1万

回帖

9万

积分

积分
93613
QQ

显示全部楼层

kuing 发表于 2018-8-28 23:33
为什么不加上 Permutations[{9,1}]、Permutations[{8,1,1}] 这些?原题到底怎么描述的,你倒是说清楚点啊

471

主题

945

回帖

9837

积分

积分
9837

显示全部楼层

 楼主| 青青子衿 发表于 2018-8-28 23:41
回复 2# kuing
所以说是指定加数的整数分拆呀
只许用1,2,3来表示10的有序整数分拆

730

主题

1万

回帖

9万

积分

积分
93613
QQ

显示全部楼层

kuing 发表于 2018-8-28 23:58
回复 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

471

主题

945

回帖

9837

积分

积分
9837

显示全部楼层

 楼主| 青青子衿 发表于 2019-9-8 10:28
回复 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

手机版|悠闲数学娱乐论坛(第3版)

GMT+8, 2025-3-4 15:31

Powered by Discuz!

× 快速回复 返回顶部 返回列表