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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

0, 0, 0, 1, 2, 4, 7, 10, 15, 24, 32, 45, 66, 86, 117, 158, 206, 268, 357, 452, 583, 745, 948, 1188, 1507, 1874, 2348, 2908, 3604, 4428, 5472, 6675, 8169, 9939, 12096, 14622, 17713, 21322, 25687, 30808, 36924, 44107, 52701, 62697, 74572, 88457, 104850, 123934
Offset: 0

Views

Author

Clark Kimberling, Sep 08 2023

Keywords

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}.

Examples

			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].
		

Crossrefs

Programs

  • 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}]
  • 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

Formula

a(n) = A000041(n)-A364994(n).

Extensions

More terms from Alois P. Heinz, Sep 12 2023

A364613 a(n) = number of partitions of n whose sum multiset is free of duplicates; see Comments.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 5, 5, 7, 8, 10, 12, 15, 18, 20, 26, 29, 36, 38, 50, 53, 67, 69, 89, 95, 115, 122, 151, 161, 195, 201, 247, 266, 312, 330, 386, 419, 487, 520, 600, 641, 742, 793, 901, 979, 1088, 1186, 1331, 1454, 1605, 1730, 1925, 2102, 2311, 2525, 2741, 3001
Offset: 0

Views

Author

Clark Kimberling, Sep 17 2023

Keywords

Comments

If M is a multiset of real numbers, then the sum multiset of M consists of the sums of pairs of distinct numbers in M. For example, the sum multiset of (1,2,4,5) is {3,5,6,6,7,9}.

Examples

			The partitions of 8 are [8], [7,1], [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 7 partitions whose sum multiset is duplicate-free are [8], [7,1], [6,2], [5,3], [5,2,1], [4,4], [4,3,1].
		

Crossrefs

Programs

  • Mathematica
    s[n_, k_] := s[n, k] = Subsets[IntegerPartitions[n][[k]], {2}];
    g[n_, k_] := g[n, k] = DuplicateFreeQ[Map[Total, s[n, k]]];
    t[n_] := Table[g[n, k], {k, 1, PartitionsP[n]}];
    a[n_] := Count[t[n], True]
    Table[a[n], {n, 1, 40}]

Formula

a(n) = A325877(n) - (1 - n mod 2) for n > 0. - Andrew Howroyd, Sep 17 2023

Extensions

More terms from Alois P. Heinz, Sep 17 2023
Showing 1-2 of 2 results.