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-4 of 4 results.

A356264 Partition triangle read by rows, counting reducible permutations, refining triangle A356265.

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 0, 1, 5, 3, 2, 0, 1, 9, 12, 15, 10, 2, 0, 1, 14, 23, 12, 47, 94, 11, 31, 24, 2, 0, 1, 20, 38, 48, 113, 293, 154, 137, 183, 409, 78, 63, 54, 2, 0, 1, 27, 60, 87, 49, 227, 738, 883, 451, 457, 670, 2157, 1007, 1580, 79, 605, 1520, 384, 127, 116, 2, 0
Offset: 0

Views

Author

Peter Luschny, Aug 05 2022

Keywords

Examples

			[0] 0;
[1] 0;
[2] 1, 0;
[3] 1, 2, 0;
[4] 1, [5, 3], 2, 0;
[5] 1, [9, 12], [15,  10],   2,  0;
[6] 1, [14, 23, 12], [ 47,  94, 11], [31,   24],   2,  0;
[7] 1, [20, 38, 48], [113, 293, 154, 137], [183, 409, 78], [63, 54], 2, 0;
Summing the bracketed terms reduces the triangle to A356265.
		

Crossrefs

Cf. A356265 (reduced), A356262, A356263, A356291 (row sums).

Programs

  • SageMath
    import collections
    def reducible(p) -> bool:  # p is a Sage-Permutation
        return any(i for i in range(1, p.size())
                      if all(p(j) < p(k)
                          for j in range(1, i + 1)
                              for k in range(i + 1, p.size() + 1) ) )
    def void(L) -> bool: return True
    def perm_red_stats(n: int, part_costraint, lehmer_constraint):
        res = collections.defaultdict(int)
        for p in Permutations(n):
            if not part_costraint(p): continue
            l: list[int] = p.to_lehmer_code()
            if lehmer_constraint(l):
                c: list[int] = [l.count(i) for i in range(len(p)) if i in l]
                res[Partition(reversed(sorted(c)))] += 1
        return sorted(res.items(), key=lambda x: len(x[0]))
    @cache
    def A356264_row(n: int) -> list[int]:
        if n < 2: return [0]
        return [v[1] for v in perm_red_stats(n, reducible, void)] + [0]
    def A356264(n: int, k: int) -> int:
        return A356264_row(n)[k]
    for n in range(0, 8): print(A356264_row(n))

A357079 Triangle read by rows. T(n, k) = A356265(n, k) + A357078(n, k) for 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 3, 2, 1, 0, 9, 12, 2, 1, 0, 49, 37, 31, 2, 1, 0, 329, 149, 176, 63, 2, 1, 0, 2561, 794, 853, 702, 127, 2, 1, 0, 22369, 5599, 3836, 5709, 2549, 255, 2, 1, 0, 216225, 47275, 18422, 37609, 33949, 8886, 511, 2, 1, 2291457, 451176, 107535, 218506, 344670, 184653, 29777, 1023, 2, 1
Offset: 0

Views

Author

Peter Luschny, Sep 11 2022

Keywords

Comments

The triangle is the termwise sum of a refinement of the number of irreducible permutations A357078, and A356265, which is a refinement of the number of reducible permutations.

Examples

			Triangle T(n, k) starts:                                 [Row sums]
[0] 1;                                                       [1]
[1] 0,     1;                                                [1]
[2] 0,     1,      1;                                        [2]
[3] 0,     3,      2,     1;                                 [6]
[4] 0,     9,     12,     2,     1;                          [24]
[5] 0,    49,     37,    31,     2,     1;                   [120]
[6] 0,   329,    149,   176,    63,     2,    1;             [720]
[7] 0,   2561,   794,   853,   702,   127,    2,   1;        [5040]
[8] 0,  22369,  5599,  3836,  5709,  2549,  255,   2, 1;     [40320]
[9] 0, 216225, 47275, 18422, 37609, 33949, 8886, 511, 2, 1;  [362880]
		

Crossrefs

Programs

  • SageMath
    def A357079_triangle(dim):
        T = A357078_triangle(dim)
        return [[0^n] + [T[n][k+1] + A356265_row(n)[k]
               for k in range(n)] for n in range(dim)]
    A357079_triangle(9)

A356115 Triangle read by rows. The reduced triangle of the partition triangle of reducible permutations with weakly decreasing Lehmer code (A356266). T(n, k) for n >= 1 and 0 <= k < n.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 3, 1, 1, 0, 4, 6, 3, 1, 0, 9, 20, 6, 6, 1, 0, 11, 45, 50, 15, 10, 1, 0, 19, 93, 185, 80, 36, 15, 1, 0, 22, 196, 462, 490, 161, 77, 21, 1, 0, 33, 312, 1120, 1834, 1050, 336, 148, 28, 1
Offset: 1

Views

Author

Peter Luschny, Aug 16 2022

Keywords

Examples

			[ 1] [1]
[ 2] [0,  1]
[ 3] [0,  1,   1]
[ 4] [0,  3,   1,    1]
[ 5] [0,  4,   6,    3,    1]
[ 6] [0,  9,  20,    6,    6,    1]
[ 7] [0, 11,  45,   50,   15,   10,   1]
[ 8] [0, 19,  93,  185,   80,   36,  15,   1]
[ 9] [0, 22, 196,  462,  490,  161,  77,  21,  1]
[10] [0, 33, 312, 1120, 1834, 1050, 336, 148, 28, 1]
		

Crossrefs

Cf. A356266 (partition version), A356265, A120588 (row sums).

Programs

  • SageMath
    # uses function reduce_partition_triangle from A356265.
    def A356115_row(n: int) -> list[int]:
        return reduce_partition_triangle(A356266_row, n + 1)[n - 1]
    def A356115(n: int, k: int) -> int:
        return A356115_row(n)[k]
    for n in range(1, 11):
        print([n], A356115_row(n))

A357078 Triangle read by rows. The partition transform of A355488, which are the alternating row sums of the number of permutations of [n] with k components (A059438).

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 8, 4, 0, 1, 0, 48, 16, 6, 0, 1, 0, 328, 100, 24, 8, 0, 1, 0, 2560, 688, 156, 32, 10, 0, 1, 0, 22368, 5376, 1080, 216, 40, 12, 0, 1, 0, 216224, 46816, 8456, 1504, 280, 48, 14, 0, 1, 0, 2291456, 450240, 73440, 11808, 1960, 348, 56, 16, 0, 1
Offset: 0

Views

Author

Peter Luschny, Sep 10 2022

Keywords

Comments

The partition transform (also called De Moivre polynomials by Cormac O'Sullivan) is defined in the program section as a Sage script.
The triangle represents a refinement of the number of irreducible permutations, A003319. Together with the refinement of the number of reducible permutations A356265 the triangle sums to the refinement of the factorial numbers given in A357079.

Examples

			Triangle T(n, k) starts:                         [Row sums]
[0] 1;                                               [1]
[1] 0,      1;                                       [1]
[2] 0,      0,     1;                                [1]
[3] 0,      2,     0,    1;                          [3]
[4] 0,      8,     4,    0,    1;                    [13]
[5] 0,     48,    16,    6,    0,   1;               [71]
[6] 0,    328,   100,   24,    8,   0,  1;           [461]
[7] 0,   2560,   688,  156,   32,  10,  0,  1;       [3447]
[8] 0,  22368,  5376, 1080,  216,  40, 12,  0, 1;    [29093]
[9] 0, 216224, 46816, 8456, 1504, 280, 48, 14, 0, 1; [273343]
		

Crossrefs

Programs

  • SageMath
    from functools import cache
    def PartTrans(dim, f):
        X = var(['x' + str(i) for i in range(dim + 1)])
        @cache
        def PCoeffs(n: int, k: int):
            R = PolynomialRing(ZZ, X[1: n - k + 2], n - k + 1, order='lex')
            if k == 0: return R(k^n)
            return R(sum(PCoeffs(n - j, k - 1) * f(j)
                         for j in range(1, n - k + 2)))
        return [[PCoeffs(n, k) for k in range(n + 1)] for n in range(dim)]
    def A357078_triangle(dim):
        A = ZZ[['t']]; g = A([0] + [factorial(n) for n in range(1, 30)]).O(dim+2)
        return PartTrans(dim, lambda n: list(g / (1 + 2 * g))[n])
    A357078_triangle(9)
Showing 1-4 of 4 results.