login
Number of strict Golomb partitions of n.
13

%I #15 Sep 18 2023 02:07:32

%S 1,1,1,2,2,3,3,5,6,6,9,11,10,15,17,18,24,29,27,38,43,47,53,67,67,84,

%T 87,102,113,137,131,167,179,204,213,261,263,315,327,377,413,476,472,

%U 564,602,677,707,820,845,969,1027,1131,1213,1364,1413,1596,1700,1858

%N Number of strict Golomb partitions of n.

%C We define a Golomb partition of n to be an integer partition of n such that every ordered pair of distinct parts has a different difference.

%C Also the number of strict integer partitions of n such that every orderless pair of (not necessarily distinct) parts has a different sum.

%C The non-strict case is A325858.

%H Fausto A. C. Cariboni, <a href="/A325876/b325876.txt">Table of n, a(n) for n = 0..500</a>

%e The a(2) = 1 through a(11) = 11 partitions (A = 10, B = 11):

%e (2) (3) (4) (5) (6) (7) (8) (9) (A) (B)

%e (21) (31) (32) (42) (43) (53) (54) (64) (65)

%e (41) (51) (52) (62) (63) (73) (74)

%e (61) (71) (72) (82) (83)

%e (421) (431) (81) (91) (92)

%e (521) (621) (532) (A1)

%e (541) (542)

%e (631) (632)

%e (721) (641)

%e (731)

%e (821)

%t Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&UnsameQ@@Subtract@@@Subsets[Union[#],{2}]&]],{n,0,30}]

%o (Python)

%o from collections import Counter

%o from itertools import combinations

%o from sympy.utilities.iterables import partitions

%o def A325876(n): return sum(1 for p in partitions(n) if max(list(Counter(abs(d[0]-d[1]) for d in combinations(list(Counter(p).elements()),2)).values()),default=1)==1)-(n&1^1) if n else 1 # _Chai Wah Wu_, Sep 17 2023

%Y The subset case is A143823.

%Y The maximal case is A325879.

%Y The integer partition case is A325858.

%Y The strict integer partition case is A325876.

%Y Heinz numbers of the counterexamples are given by A325992.

%Y Cf. A002033, A275972, A325325, A325853, A325856, A325868.

%K nonn

%O 0,4

%A _Gus Wiseman_, Jun 02 2019