cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A364612 a(n) = number of partitions of n whose difference multiset has at least one duplicate; see Comments.

This page as a plain text file.
%I A364612 #10 Sep 18 2023 02:08:37
%S A364612 0,0,0,1,2,4,7,10,15,24,32,45,66,86,117,158,206,268,357,452,583,745,
%T A364612 948,1188,1507,1874,2348,2908,3604,4428,5472,6675,8169,9939,12096,
%U A364612 14622,17713,21322,25687,30808,36924,44107,52701,62697,74572,88457,104850,123934
%N A364612 a(n) = number of partitions of n whose difference multiset has at least one duplicate; see Comments.
%C A364612 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}.
%F A364612 a(n) = A000041(n)-A364994(n).
%e A364612 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],
%e A364612 [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].
%e A364612 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].
%t A364612 s[n_, k_] := s[n, k] = Subsets[IntegerPartitions[n][[k]], {2}]
%t A364612 g[n_, k_] := g[n, k] = DuplicateFreeQ[Map[Differences, s[n, k]]]
%t A364612 t[n_] := t[n] = Table[g[n, k], {k, 1, PartitionsP[n]}];
%t A364612 a[n_] := Count[t[n], False];
%t A364612 Table[a[n], {n, 1, 30}]
%o A364612 (Python)
%o A364612 from collections import Counter
%o A364612 from itertools import combinations
%o A364612 from sympy.utilities.iterables import partitions
%o A364612 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
%Y A364612 Cf. A000041, A363994.
%K A364612 nonn
%O A364612 0,5
%A A364612 _Clark Kimberling_, Sep 08 2023
%E A364612 More terms from _Alois P. Heinz_, Sep 12 2023