🧮 整数分拆计算器(分拆数 p(n))Integer Partition Calculator — p(n)
计算正整数 n 的分拆数 p(n)(最大 n = 5000,BigInt 精确到每一位)、互不相同部分的分拆数 q(n)、恰好分成 k 份和每份不超过 m 的分拆数,n ≤ 40 时可列出全部分拆方式并复制。Compute the partition number p(n) exactly (n up to 5000, BigInt), partitions into distinct parts q(n), into exactly k parts or with parts ≤ m, and list every partition for n ≤ 40.
列出所有分拆(n ≤ 40)List every partition (n ≤ 40)
整数分拆:把正整数 n 写成若干正整数之和、不计顺序的方法数,记作 p(n)。例如 4 = 4 = 3+1 = 2+2 = 2+1+1 = 1+1+1+1,所以 p(4) = 5。本工具用欧拉五边形数定理递推,大数用 BigInt 精确计算。An integer partition writes n as a sum of positive integers, ignoring order; p(n) counts them — 4 = 3+1 = 2+2 = 2+1+1 = 1+1+1+1, so p(4) = 5. Computed exactly with Euler’s pentagonal-number recurrence and BigInt.
使用说明与常见问题How-to & FAQ
「整数分拆计算器(分拆数 p(n))」是什么?What is the Integer Partition Calculator — p(n)?
计算正整数 n 的分拆数 p(n)(最大 n = 5000,BigInt 精确到每一位)、互不相同部分的分拆数 q(n)、恰好分成 k 份和每份不超过 m 的分拆数,n ≤ 40 时可列出全部分拆方式并复制。Compute the partition number p(n) exactly (n up to 5000, BigInt), partitions into distinct parts q(n), into exactly k parts or with parts ≤ m, and list every partition for n ≤ 40.
如何使用「整数分拆计算器(分拆数 p(n))」?How do I use the Integer Partition Calculator — p(n)?
输入 n,结果实时更新;可选填 k(恰好几份)或 m(每份最大值)。点“列出”查看所有分拆,勾选“只要互不相同的部分”只列互异分拆。Enter n and results update live; optionally set k (exact number of parts) or m (largest part). Press List to see every partition, optionally distinct parts only.
p(100) 是多少?What is p(100)?
p(100) = 190,569,292,即 100 有约 1.9 亿种分拆方式。p(100) = 190,569,292.
为什么互异分拆数等于奇数分拆数?Why do distinct-part and odd-part counts match?
这是欧拉证明的经典定理:把 n 分成互不相同的部分的方法数,等于把 n 分成全是奇数的部分的方法数。A classic theorem of Euler: partitions into distinct parts are equinumerous with partitions into odd parts.
「整数分拆计算器(分拆数 p(n))」免费吗?文件会上传吗?Is the Integer Partition Calculator — p(n) free? Are my files uploaded?
「整数分拆计算器(分拆数 p(n))」完全免费,无需注册。你输入的内容只在本机浏览器里处理(部分设置会保存在本机方便下次使用),不会上传到任何服务器。The Integer Partition Calculator — p(n) is free with no sign-up. What you enter is processed only in this browser (some settings are kept locally for next time) and is never uploaded.