A316898 Number of integer partitions of n into relatively prime parts whose reciprocal sum is the reciprocal of an integer.
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 4, 1, 3, 1, 1, 1, 3, 1, 8, 3, 1, 1, 9, 2, 11, 3, 3, 3, 5, 2, 7, 6, 4, 7, 12, 5, 14, 6, 11, 12, 25, 11, 27, 17, 15, 19, 25, 9, 37, 20, 21, 19, 31, 19, 38, 33, 26, 37, 38, 36, 64, 39, 46, 53, 63, 39, 80, 63, 65, 66, 94, 59, 105
Offset: 1
Keywords
Examples
The a(37) = 8 partitions: (20,12,5), (15,12,10), (24,8,3,2), (15,10,6,6), (20,5,4,4,4), (15,10,6,3,3), (14,7,7,7,2), (10,10,10,5,2).
Links
- Robert G. Wilson v, Table of n, a(n) for n = 1..150
- Gus Wiseman, Sequences counting and ranking integer partitions by their reciprocal sums
Crossrefs
Programs
-
Mathematica
f[n_] := Block[{k = 1, s = 0, lmt = 1 + PartitionsP@ n}, While[k < lmt, s += Length[ Select[ IntegerPartitions[n, {k, k}], GCD @@ # == 1 && IntegerQ[1/Sum[1/m, {m, #}]] &]]; k++]; s]; Array[f, 50] (* slightly modified by Robert G. Wilson v, Jul 17 2018 *) (* or *) ric[n_,p_,s_] := If[n==0, If[IntegerQ[1/s] && GCD @@ p == 1, c++], Do[ If[s + 1/i <= 1, ric[n-i, Append[p, i], s + 1/i]], {i, Min[p[[-1]], n], 1, -1}]]; a[n_] := (c=0; Do[ric[n-j, {j}, 1/j], {j, n}]; c); Array[a, 50] (* Giovanni Resta, Jul 18 2018 *)
Extensions
a(51)-a(91) from Robert G. Wilson v, Jul 17 2018
Comments