Skip to content

PartitionsQ ​

The number q(n)q(n) of partitions of nn into distinct parts.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguagePartitionsQ✓
PartitionsQ(n)q(n)q(n), distinct-part partitions of nn
Typed signatures
TypePackageApplies
(integer) -> integernumber-theoryalways

Domain: Number theory

Details

Examples

Basic #

The partitions of 10 into distinct parts

live ↗
InPartitionsQ(10)\mathrm{PartitionsQ}(10)Out1010

The empty partition

live ↗
InPartitionsQ(0)\mathrm{PartitionsQ}(0)Out11
Scope #

Exact for large n

live ↗
InPartitionsQ(100)\mathrm{PartitionsQ}(100)Out444 793444\,793

Threads over a list

live ↗
InPartitionsQ([1,2,3,4,5,6,7,8])\mathrm{PartitionsQ}(\bigl\lbrack1, 2, 3, 4, 5, 6, 7, 8\bigr\rbrack)Out[1,1,2,2,3,4,5,6]\bigl\lbrack1, 1, 2, 2, 3, 4, 5, 6\bigr\rbrack

Threads over a list of arguments

live ↗
InPartitionsQ([2,4,6])\mathrm{PartitionsQ}(\bigl\lbrack2, 4, 6\bigr\rbrack)Out[1,2,4]\bigl\lbrack1, 2, 4\bigr\rbrack
Properties #

Counts the DistinctPartitions family

live ↗
InPartitionsQ(10)=Count(DistinctPartitions(10))\mathrm{PartitionsQ}(10)=\mathrm{Count}(\mathrm{DistinctPartitions}(10))OutTrue\mathrm{True}

Euler: as many partitions into odd parts as into distinct parts, counted with IntegerPartitions' part restriction

live ↗
InPartitionsQ(12)=Count(IntegerPartitions(12,All,[1,3,5,7,9,11]))\mathrm{PartitionsQ}(12)=\mathrm{Count}(\mathrm{IntegerPartitions}(12, \mathrm{All}, \bigl\lbrack1, 3, 5, 7, 9, 11\bigr\rbrack))OutTrue\mathrm{True}

Partitions of 5 into distinct parts: 5,4+1,3+25,4+1,3+2

live ↗
InPartitionsQ(5)\mathrm{PartitionsQ}(5)Out33

Only the partition 11

live ↗
InPartitionsQ(1)\mathrm{PartitionsQ}(1)Out11

Known value · Wolfram MathematicalFunctionData, PartitionsQ

22 alone, since 1+11+1 repeats a part

live ↗
InPartitionsQ(2)\mathrm{PartitionsQ}(2)Out11

Known value · Wolfram MathematicalFunctionData, PartitionsQ

33 and 2+12+1

live ↗
InPartitionsQ(3)\mathrm{PartitionsQ}(3)Out22

Known value · Wolfram MathematicalFunctionData, PartitionsQ

44 and 3+13+1

live ↗
InPartitionsQ(4)\mathrm{PartitionsQ}(4)Out22

Known value · Wolfram MathematicalFunctionData, PartitionsQ

Four partitions into distinct parts

live ↗
InPartitionsQ(6)\mathrm{PartitionsQ}(6)Out44

Known value · Wolfram MathematicalFunctionData, PartitionsQ

Counts grow slower than unrestricted partitions

live ↗
InPartitionsQ(7)\mathrm{PartitionsQ}(7)Out55

Known value · Wolfram MathematicalFunctionData, PartitionsQ

Six partitions into distinct parts

live ↗
InPartitionsQ(8)\mathrm{PartitionsQ}(8)Out66

Known value · Wolfram MathematicalFunctionData, PartitionsQ

Eight partitions of 9 into distinct parts

live ↗
InPartitionsQ(9)\mathrm{PartitionsQ}(9)Out88

Known value · Wolfram MathematicalFunctionData, PartitionsQ

Equals the number of partitions of 11 into odd parts

live ↗
InPartitionsQ(11)\mathrm{PartitionsQ}(11)Out1212

Known value · Wolfram MathematicalFunctionData, PartitionsQ

The value 15

live ↗
InPartitionsQ(12)\mathrm{PartitionsQ}(12)Out1515

Known value · Wolfram MathematicalFunctionData, PartitionsQ

The value 18

live ↗
InPartitionsQ(13)\mathrm{PartitionsQ}(13)Out1818

Known value · Wolfram MathematicalFunctionData, PartitionsQ

The value 22

live ↗
InPartitionsQ(14)\mathrm{PartitionsQ}(14)Out2222

Known value · Wolfram MathematicalFunctionData, PartitionsQ

The value 27

live ↗
InPartitionsQ(15)\mathrm{PartitionsQ}(15)Out2727

Known value · Wolfram MathematicalFunctionData, PartitionsQ

The value 32

live ↗
InPartitionsQ(16)\mathrm{PartitionsQ}(16)Out3232

Known value · Wolfram MathematicalFunctionData, PartitionsQ

The value 38

live ↗
InPartitionsQ(17)\mathrm{PartitionsQ}(17)Out3838

Known value · Wolfram MathematicalFunctionData, PartitionsQ

Possible issues #
live ↗
InPartitionsQ(−Expand((e+1)2)+12+(1+e)2)\mathrm{PartitionsQ}(-\mathrm{Expand}((e+1)^2)+12+(1+e)^2)OutPartitionsQ(11−2e−e2+(1+e)2)\mathrm{PartitionsQ}(11-2e-e^{2}+(1+e)^2)
About
Examples24
Checked againstWolfram Language 23 agree
CrosswalkWolfram Language

See also: DistinctPartitions, IntegerPartitions