OFFSET
1,2
REFERENCES
From a question posted to the news group comp.soft-sys.math.mathematica by "Juan" (erfa11(AT)hotmail.com) at Steven M. Christensen and Associates, Inc and MathTensor, Inc. Jan 22 2002 08:46:57 +0000 (UTC).
EXAMPLE
a(12) = 39 because the partitions of 12 whose reciprocal sum is an integer are: {{6, 3, 2, 1}, {4, 4, 2, 1, 1}, {3, 3, 3, 1, 1, 1}, {2, 2, 2, 2, 2, 2}, {2, 2, 2, 2, 1, 1, 1, 1}, {2, 2, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}}. Individually their reciprocal sums are: 2, 3, 4, 3, 6, 9 and 12 which together equals 39.
MATHEMATICA
<< DiscreteMath`Combinatorica`; f[n_] := (p = Partitions[n]; is = Compile[ {{x, _Integer, 1}}, Plus @@ (1/x)]; ans = p[[ Flatten[ Position[ FractionalPart[ is /@ p], x_ /; x < .000001 || x > 0.999999]]]]); g[n_] := (q = f[n]; s = 0; k = 1; l = Length[q]; While[k < l + 1, s = s + is[ q[[k]]]; k++ ]; IntegerPart[s]); Table[ Length[ f[n]], {n, 1, 65} ]
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Jan 25 2002
STATUS
approved