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.

Previous Showing 11-12 of 12 results.

A325875 Number of compositions of n whose differences of all degrees > 1 are nonzero.

Original entry on oeis.org

1, 1, 2, 3, 7, 13, 20, 38, 69, 129, 222, 407, 726, 1313, 2318, 4146, 7432, 13296, 23759, 42458, 75714
Offset: 0

Views

Author

Gus Wiseman, Jun 02 2019

Keywords

Comments

The differences of a sequence are defined as if the sequence were increasing, so for example the differences of (6,3,1) are (-3,-2). The zeroth differences are the sequence itself, while k-th differences for k > 0 are the differences of the (k-1)-th differences. If m is the length of the sequence, its differences of all degrees are the union of the zeroth through m-th differences.
A composition of n is a finite sequence of positive integers with sum n.
The case for all degrees including 1 is A325851.

Examples

			The a(1) = 1 through a(6) = 20 compositions:
  (1)  (2)   (3)   (4)    (5)     (6)
       (11)  (12)  (13)   (14)    (15)
             (21)  (22)   (23)    (24)
                   (31)   (32)    (33)
                   (112)  (41)    (42)
                   (121)  (113)   (51)
                   (211)  (122)   (114)
                          (131)   (132)
                          (212)   (141)
                          (221)   (213)
                          (311)   (231)
                          (1121)  (312)
                          (1211)  (411)
                                  (1122)
                                  (1131)
                                  (1212)
                                  (1311)
                                  (2121)
                                  (2211)
                                  (11211)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!MemberQ[Union@@Table[Differences[#,i],{i,2,Length[#]}],0]&]],{n,0,10}]

A363994 a(n) is the number of partitions of n whose difference multiset has no duplicates; see Comments.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 4, 5, 7, 6, 10, 11, 11, 15, 18, 18, 25, 29, 28, 38, 44, 47, 54, 67, 68, 84, 88, 102, 114, 137, 132, 167, 180, 204, 214, 261, 264, 315, 328, 377, 414, 476, 473, 564, 603, 677, 708, 820, 846, 969, 1028, 1131, 1214, 1364, 1414, 1596, 1701, 1858
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 differences of pairs of numbers in M. For example, the difference multiset of {1,2,2,5} is {0,1,1,3,3,4}.

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 difference 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[Differences, s[n, k]]]
    t[n_] := t[n] = Table[g[n, k], {k, 1, PartitionsP[n]}];
    a[n_] := Count[t[n], True];
    Table[a[n], {n, 1, 20}]
  • Python
    from collections import Counter
    from itertools import combinations
    from sympy.utilities.iterables import partitions
    def A363994(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) - A364612(n).
a(n) = A325876(n) - (1 - n mod 2) for n > 0. - Andrew Howroyd, Sep 17 2023

Extensions

More terms from Alois P. Heinz, Sep 12 2023
Previous Showing 11-12 of 12 results.