Perfect Partition

Author

Eric W. Weisstein
November 29, 2003

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Combinatorics/PerfectPartition.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/PerfectPartition.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Code

PerfectPartitionQ[l_List]:=Module[{n=Plus@@l},
Sort[Plus@@@Union[Subsets[l]]]==Range[0,n]
]

b[1]:=1
b[n_]:=b[n]=Plus@@b/@Most[Divisors[n]]

a[n_]:=b[n+1]

Enumeration

a/@Range[10]

Length/@Table[Select[Partitions[n],PerfectPartitionQ],{n,10}]

Table[Select[Partitions[n],PerfectPartitionQ],{n,10}]//ColumnForm

{a[#-1],2^(FactorInteger[#][[1,2]]-1)}&/@{(2^2),(3^2),(5^7),(11^4)}