PartitionsQ
PartitionsQ[n] gives the number of partitions of the integer into distinct parts.
Integer mathematical function (see Section A.3.10). See The Mathematica Book: Section 3.2.5. See also: PartitionsP.
Further Examples