A365068 Number of integer partitions of n with some part that can be written as a nonnegative linear combination of the other distinct parts.
0, 0, 0, 1, 2, 4, 7, 10, 16, 23, 34, 44, 67, 85, 119, 157, 210, 268, 360, 453, 592, 748, 956, 1195, 1520, 1883, 2365, 2920, 3628, 4451, 5494, 6702, 8211, 9976, 12147, 14666, 17776, 21389, 25774, 30887, 37035, 44224, 52819, 62836, 74753, 88614, 105062, 124160
Offset: 0
Keywords
Examples
The partition (5,4,3,3) has no part that can be written as a nonnegative linear combination of the others, so is not counted under a(15). The partition (6,4,3,2) has 6 = 1*2 + 1*4, so is counted under a(15). The combinations 6 = 2*3 = 3*2 and 4 = 2*2 can also be used. The a(3) = 1 through a(8) = 16 partitions: (21) (31) (41) (42) (61) (62) (211) (221) (51) (331) (71) (311) (321) (421) (422) (2111) (411) (511) (431) (2211) (2221) (521) (3111) (3211) (611) (21111) (4111) (3221) (22111) (3311) (31111) (4211) (211111) (5111) (22211) (32111) (41111) (221111) (311111) (2111111)
Crossrefs
Programs
-
Mathematica
combs[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,0,Floor[n/k]}]}, Select[Tuples[s],Total[Times@@@#]==n&]]; Table[Length[Select[IntegerPartitions[n], Function[ptn,Or@@Table[combs[ptn[[k]], DeleteCases[ptn,ptn[[k]]]]!={}, {k,Length[ptn]}]]]],{n,0,5}]
-
Python
from sympy.utilities.iterables import partitions def A365068(n): if n <= 1: return 0 alist, c = [set(tuple(sorted(set(p))) for p in partitions(i)) for i in range(n)], 0 for p in partitions(n,k=n-1): s = set(p) if any(set(t).issubset(s-{q}) for q in s for t in alist[q]): c += 1 return c # Chai Wah Wu, Sep 20 2023
Extensions
a(31)-a(47) from Chai Wah Wu, Sep 20 2023
Comments