OFFSET
0,5
COMMENTS
If M is a multiset of real numbers, then the difference multiset of M consists of the nonnegative differences of pairs of numbers in M. For example, the difference multiset of {1,2,2,5} is {1,1,3,4}.
EXAMPLE
The partitions of 8 are [8], [7,1], [6,2], [6,1,1], [5,3], [6,2], [6,1,1], [5,3], [5,2,1], [5,1,1,1], [4,4], [4,3,1], [4,2,2], [4,2,1,1],
[4,1,1,1,1], [3,3,2], [3,3,1,1], [3,2,2,1], [3,2,1,1,1], [3,1,1,1,1,1], [2,2,2,2], [2,2,2,1,1], [2,2,1,1,1,1], [2,1,1,1,1,1,1], [1,1,1,1,1,1,1,1].
The 15 partitions whose difference multiset includes at least one duplicate are all the 22 partitions of 8 except these 7: [8], [7,1], [6,2], [5,3], [6,2], [5,3], [5,2,1], [4,3,1].
MATHEMATICA
s[n_, k_] := s[n, k] = Subsets[IntegerPartitions[n][[k]], {2}]
g[n_, k_] := g[n, k] = DuplicateFreeQ[Map[Differences, s[n, k]]]
t[n_] := t[n] = Table[g[n, k], {k, 1, PartitionsP[n]}];
a[n_] := Count[t[n], False];
Table[a[n], {n, 1, 30}]
PROG
(Python)
from collections import Counter
from itertools import combinations
from sympy.utilities.iterables import partitions
def A364612(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) # Chai Wah Wu, Sep 17 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Sep 08 2023
EXTENSIONS
More terms from Alois P. Heinz, Sep 12 2023
STATUS
approved