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-10 of 17 results. Next

A360071 Regular tetrangle where T(n,k,i) = number of integer partitions of n of length k with i distinct parts.

Original entry on oeis.org

1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 2, 0, 2, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 2, 1, 1, 1, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 1, 0, 2, 1, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Jan 28 2023

Keywords

Comments

I call this a tetrangle because it is a sequence of finite triangles. - Gus Wiseman, Jan 30 2023

Examples

			Tetrangle begins:
  1   1     1       1         1           1             1
      1 0   0 1     1 1       0 2         1 2           0 3
            1 0 0   0 1 0     0 2 0       1 1 1         0 3 1
                    1 0 0 0   0 1 0 0     0 2 0 0       0 2 1 0
                              1 0 0 0 0   0 1 0 0 0     0 2 0 0 0
                                          1 0 0 0 0 0   0 1 0 0 0 0
                                                        1 0 0 0 0 0 0
For example, finite triangle n = 5 counts the following partitions:
    (5)
     .    (41)(32)
     .   (311)(221)  .
     .     (2111)    .   .
  (11111)     .      .   .   .
		

Crossrefs

Row sums are A008284 (partitions by number of parts), reverse A058398.
First columns i = 1 are A051731.
Last columns i = k are A060016.
Column sums are A116608 (partitions by number of distinct parts).
Positive terms are counted by A360072.
A000041 counts partitions, strict A000009.
Other tetrangles: A318393, A318816, A320808, A334433, A345197.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], Length[#]==k&&Length[Union[#]]==i&]],{n,1,9},{k,1,n},{i,1,k}]

A321449 Regular triangle read by rows where T(n,k) is the number of twice-partitions of n with a combined total of k parts.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 4, 5, 5, 0, 1, 4, 8, 8, 7, 0, 1, 6, 13, 19, 16, 11, 0, 1, 6, 17, 27, 32, 24, 15, 0, 1, 8, 24, 47, 61, 62, 41, 22, 0, 1, 8, 30, 63, 99, 111, 100, 61, 30, 0, 1, 10, 38, 94, 158, 209, 210, 170, 95, 42, 0, 1, 10, 45, 119, 229, 328, 382, 348, 259, 136, 56
Offset: 0

Views

Author

Gus Wiseman, Nov 10 2018

Keywords

Comments

A twice partition of n (A063834) is a choice of an integer partition of each part in an integer partition of n.

Examples

			Triangle begins:
   1
   0   1
   0   1   2
   0   1   2   3
   0   1   4   5   5
   0   1   4   8   8   7
   0   1   6  13  19  16  11
   0   1   6  17  27  32  24  15
   0   1   8  24  47  61  62  41  22
   0   1   8  30  63  99 111 100  61  30
The sixth row {0, 1, 6, 13, 19, 16, 11} counts the following twice-partitions:
  (6)  (33)    (222)      (2211)        (21111)          (111111)
       (42)    (321)      (3111)        (1111)(2)        (111)(111)
       (51)    (411)      (111)(3)      (111)(21)        (1111)(11)
       (3)(3)  (21)(3)    (211)(2)      (21)(111)        (11111)(1)
       (4)(2)  (22)(2)    (21)(21)      (211)(11)        (11)(11)(11)
       (5)(1)  (31)(2)    (22)(11)      (2111)(1)        (111)(11)(1)
               (3)(21)    (221)(1)      (11)(11)(2)      (1111)(1)(1)
               (32)(1)    (3)(111)      (111)(2)(1)      (11)(11)(1)(1)
               (4)(11)    (31)(11)      (11)(2)(11)      (111)(1)(1)(1)
               (41)(1)    (311)(1)      (2)(11)(11)      (11)(1)(1)(1)(1)
               (2)(2)(2)  (11)(2)(2)    (21)(11)(1)      (1)(1)(1)(1)(1)(1)
               (3)(2)(1)  (2)(11)(2)    (211)(1)(1)
               (4)(1)(1)  (21)(2)(1)    (11)(2)(1)(1)
                          (2)(2)(11)    (2)(11)(1)(1)
                          (22)(1)(1)    (21)(1)(1)(1)
                          (3)(11)(1)    (2)(1)(1)(1)(1)
                          (31)(1)(1)
                          (2)(2)(1)(1)
                          (3)(1)(1)(1)
		

Crossrefs

Programs

  • Maple
    g:= proc(n, i) option remember; `if`(n=0 or i=1, x^n,
          g(n, i-1)+ `if`(i>n, 0, expand(g(n-i, i)*x)))
        end:
    b:= proc(n, i) option remember; `if`(n=0 or i=1, x^n,
          b(n, i-1)+ `if`(i>n, 0, expand(b(n-i, i)*g(i$2))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2)):
    seq(T(n), n=0..12);  # Alois P. Heinz, Nov 11 2018
  • Mathematica
    Table[Length[Join@@Table[Select[Tuples[IntegerPartitions/@ptn],Length[Join@@#]==k&],{ptn,IntegerPartitions[n]}]],{n,0,10},{k,0,n}]
    (* Second program: *)
    g[n_, i_] := g[n, i] = If[n == 0 || i == 1, x^n,
         g[n, i - 1] + If[i > n, 0, Expand[g[n - i, i]*x]]];
    b[n_, i_] := b[n, i] = If[n == 0 || i == 1, x^n,
         b[n, i - 1] + If[i > n, 0, Expand[b[n - i, i]*g[i, i]]]];
    T[n_] := CoefficientList[b[n, n], x];
    T /@ Range[0, 12] // Flatten (* Jean-François Alcover, May 20 2021, after Alois P. Heinz *)

Formula

O.g.f.: Product_{n >= 0} 1/(1 - x^n * (Sum_{0 <= k <= n} A008284(n,k) * t^k)).

A345908 Traces of the matrices (A345197) counting integer compositions by length and alternating sum.

Original entry on oeis.org

1, 1, 0, 1, 3, 3, 6, 15, 24, 43, 92, 171, 315, 629, 1218, 2313, 4523, 8835, 17076, 33299, 65169
Offset: 0

Views

Author

Gus Wiseman, Jul 26 2021

Keywords

Comments

The matrices (A345197) count the integer compositions of n of length k with alternating sum i, where 1 <= k <= n, and i ranges from -n + 2 to n in steps of 2. Here, the alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. So a(n) is the number of compositions of n of length (n + s)/2, where s is the alternating sum of the composition.

Examples

			The a(0) = 1 through a(7) = 15 compositions of n = 0..7 of length (n + s)/2 where s = alternating sum (empty column indicated by dot):
  ()  (1)  .  (2,1)  (2,2)    (2,3)    (2,4)      (2,5)
                     (1,1,2)  (1,2,2)  (1,3,2)    (1,4,2)
                     (2,1,1)  (2,2,1)  (2,3,1)    (2,4,1)
                                       (1,1,3,1)  (1,1,3,2)
                                       (2,1,2,1)  (1,2,3,1)
                                       (3,1,1,1)  (2,1,2,2)
                                                  (2,2,2,1)
                                                  (3,1,1,2)
                                                  (3,2,1,1)
                                                  (1,1,1,1,3)
                                                  (1,1,2,1,2)
                                                  (1,1,3,1,1)
                                                  (2,1,1,1,2)
                                                  (2,1,2,1,1)
                                                  (3,1,1,1,1)
		

Crossrefs

Traces of the matrices given by A345197.
Diagonals and antidiagonals of the same matrices are A346632 and A345907.
Row sums of A346632.
A011782 counts compositions.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A316524 gives the alternating sum of prime indices (reverse: A344616).
Other diagonals are A008277 of A318393 and A055884 of A320808.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
- k = 0: counted by A088218, ranked by A344619/A344619.
- k = 1: counted by A000984, ranked by A345909/A345911.
- k = -1: counted by A001791, ranked by A345910/A345912.
- k = 2: counted by A088218, ranked by A345925/A345922.
- k = -2: counted by A002054, ranked by A345924/A345923.
- k >= 0: counted by A116406, ranked by A345913/A345914.
- k <= 0: counted by A058622(n-1), ranked by A345915/A345916.
- k > 0: counted by A027306, ranked by A345917/A345918.
- k < 0: counted by A294175, ranked by A345919/A345920.
- k != 0: counted by A058622, ranked by A345921/A345921.
- k even: counted by A081294, ranked by A053754/A053754.
- k odd: counted by A000302, ranked by A053738/A053738.

Programs

  • Mathematica
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[#]==(n+ats[#])/2&]],{n,0,15}]

A320808 Regular tetrangle where T(n,k,i) is the number of nonnegative integer matrices up to row and column permutations with no zero rows or columns and k nonzero entries summing to n, with i columns.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 1, 0, 1, 2, 0, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 0, 1, 0, 2, 4, 0, 1, 5, 4, 0, 1, 5, 5, 5, 0, 0, 1, 0, 2, 4, 0, 2, 10, 8, 0, 1, 9, 13, 7, 0, 1, 5, 12, 9, 7, 0, 0, 1, 0, 3, 6, 0, 3, 16, 12, 0, 2, 24, 33, 16, 0, 1, 14, 36, 29, 12, 0, 1, 9, 23, 29
Offset: 1

Views

Author

Gus Wiseman, Nov 09 2018

Keywords

Examples

			Tetrangle begins:
  1  0    0      0        0          0
     0 1  0 1    0 1      0 1        0 1
          0 1 2  0 1 2    0 2 4      0 2 4
                 0 1 2 3  0 1 5 4    0 2 10 8
                          0 1 5 5 5  0 1 9 13 7
                                     0 1 5 12 9 7
		

Crossrefs

Triangle sums are A007716. Triangle of row sums is A320801. Triangle of column sums is A317533. Triangle of last columns (without its leading column 1,0,0,0,...) is A055884.

A321760 Number of non-isomorphic multiset partitions of weight n with no constant parts or vertices that appear in only one part.

Original entry on oeis.org

1, 0, 0, 0, 1, 1, 7, 9, 37, 79, 273, 755, 2648, 8432, 29872, 104624, 384759, 1432655, 5502563, 21533141, 86291313, 352654980, 1471073073, 6253397866, 27083003687, 119399628021, 535591458635, 2443030798539, 11326169401988, 53343974825122, 255121588496338
Offset: 0

Views

Author

Gus Wiseman, Nov 29 2018

Keywords

Comments

Also the number of nonnegative integer matrices up to row and column permutations with sum of elements equal to n in which every row and column has at least two nonzero entries.
The weight of a multiset partition is the sum of sizes of its parts. Weight is generally not the same as number of vertices.

Examples

			Non-isomorphic representatives of the a(4) = 1 through a(7) = 9 multiset partitions:
  {{1,2},{1,2}}  {{1,2},{1,2,2}}  {{1,1,2},{1,2,2}}    {{1,1,2},{1,2,2,2}}
                                  {{1,2},{1,1,2,2}}    {{1,2},{1,1,2,2,2}}
                                  {{1,2},{1,2,2,2}}    {{1,2},{1,2,2,2,2}}
                                  {{1,2,2},{1,2,2}}    {{1,2,2},{1,1,2,2}}
                                  {{1,2,3},{1,2,3}}    {{1,2,2},{1,2,2,2}}
                                  {{1,2},{1,2},{1,2}}  {{1,2,3},{1,2,3,3}}
                                  {{1,2},{1,3},{2,3}}  {{1,2},{1,2},{1,2,2}}
                                                       {{1,2},{1,3},{2,3,3}}
                                                       {{1,3},{2,3},{1,2,3}}
		

Crossrefs

Programs

Extensions

a(11) onwards from Andrew Howroyd, Jan 27 2024

A323718 Array read by antidiagonals upwards where A(n,k) is the number of k-times partitions of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 3, 1, 1, 1, 5, 6, 4, 1, 1, 1, 7, 15, 10, 5, 1, 1, 1, 11, 28, 34, 15, 6, 1, 1, 1, 15, 66, 80, 65, 21, 7, 1, 1, 1, 22, 122, 254, 185, 111, 28, 8, 1, 1, 1, 30, 266, 604, 739, 371, 175, 36, 9, 1, 1, 1, 42, 503, 1785, 2163, 1785, 672, 260, 45, 10, 1, 1
Offset: 0

Views

Author

Gus Wiseman, Jan 25 2019

Keywords

Comments

A k-times partition of n for k > 1 is a sequence of (k-1)-times partitions, one of each part in an integer partition of n. A 1-times partition of n is just an integer partition of n, and the only 0-times partition of n is the number n itself.

Examples

			Array begins:
       k=0:   k=1:   k=2:   k=3:   k=4:   k=5:
  n=0:  1      1      1      1      1      1
  n=1:  1      1      1      1      1      1
  n=2:  1      2      3      4      5      6
  n=3:  1      3      6     10     15     21
  n=4:  1      5     15     34     65    111
  n=5:  1      7     28     80    185    371
  n=6:  1     11     66    254    739   1785
  n=7:  1     15    122    604   2163   6223
  n=8:  1     22    266   1785   8120  28413
  n=9:  1     30    503   4370  24446 101534
The A(4,2) = 15 twice-partitions:
  (4)  (31)    (22)    (211)      (1111)
       (3)(1)  (2)(2)  (11)(2)    (11)(11)
                       (2)(11)    (111)(1)
                       (21)(1)    (11)(1)(1)
                       (2)(1)(1)  (1)(1)(1)(1)
		

Crossrefs

Columns: A000012 (k=0), A000041 (k=1), A063834 (k=2), A301595 (k=3).
Rows: A000027 (n=2), A000217 (n=3), A006003 (n=4).
Main diagonal gives A306187.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0 or k=0 or i=1,
          1, b(n, i-1, k)+b(i$2, k-1)*b(n-i, min(n-i, i), k))
        end:
    A:= (n, k)-> b(n$2, k):
    seq(seq(A(d-k, k), k=0..d), d=0..14);  # Alois P. Heinz, Jan 25 2019
  • Mathematica
    ptnlev[n_,k_]:=Switch[k,0,{n},1,IntegerPartitions[n],_,Join@@Table[Tuples[ptnlev[#,k-1]&/@ptn],{ptn,IntegerPartitions[n]}]];
    Table[Length[ptnlev[sum-k,k]],{sum,0,12},{k,0,sum}]
    (* Second program: *)
    b[n_, i_, k_] := b[n, i, k] = If[n == 0 || k == 0 || i == 1, 1,
         b[n, i - 1, k] + b[i, i, k - 1]*b[n - i, Min[n - i, i], k]];
    A[n_, k_] := b[n, n, k];
    Table[Table[A[d - k, k], {k, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, May 13 2021, after Alois P. Heinz *)

Formula

Column k is the formal power product transform of column k-1, where the formal power product transform of a sequence q with offset 1 is the sequence whose ordinary generating function is Product_{n >= 1} 1/(1 - q(n) * x^n).
A(n,k) = Sum_{i=0..k} binomial(k,i) * A327639(n,i). - Alois P. Heinz, Sep 20 2019

A321407 Number of non-isomorphic multiset partitions of weight n with no constant parts.

Original entry on oeis.org

1, 0, 1, 2, 7, 13, 47, 111, 367, 1057, 3474, 11116, 38106, 131235, 470882, 1720959, 6472129, 24860957, 97779665, 392642763, 1610045000, 6732768139, 28699327441, 124600601174, 550684155992, 2476019025827, 11320106871951, 52598300581495, 248265707440448, 1189855827112636, 5787965846277749
Offset: 0

Views

Author

Gus Wiseman, Nov 29 2018

Keywords

Comments

Also the number of nonnegative integer matrices up to row and column permutations with sum of elements equal to n and no zero rows or columns, in which every row has at least two nonzero entries.
The weight of a multiset partition is the sum of sizes of its parts. Weight is generally not the same as number of vertices.

Examples

			Non-isomorphic representatives of the a(2) = 1 through a(5) = 13 multiset partitions:
  {{1,2}}  {{1,2,2}}  {{1,1,2,2}}    {{1,1,2,2,2}}
           {{1,2,3}}  {{1,2,2,2}}    {{1,2,2,2,2}}
                      {{1,2,3,3}}    {{1,2,2,3,3}}
                      {{1,2,3,4}}    {{1,2,3,3,3}}
                      {{1,2},{1,2}}  {{1,2,3,4,4}}
                      {{1,2},{3,4}}  {{1,2,3,4,5}}
                      {{1,3},{2,3}}  {{1,2},{1,2,2}}
                                     {{1,2},{2,3,3}}
                                     {{1,2},{3,4,4}}
                                     {{1,2},{3,4,5}}
                                     {{1,3},{2,3,3}}
                                     {{1,4},{2,3,4}}
                                     {{2,3},{1,2,3}}
		

Crossrefs

Programs

  • PARI
    EulerT(v)={Vec(exp(x*Ser(dirmul(v, vector(#v, n, 1/n))))-1, -#v)}
    permcount(v) = {my(m=1, s=0, k=0, t); for(i=1, #v, t=v[i]; k=if(i>1&&t==v[i-1], k+1, 1); m*=t*k; s+=t); s!/m}
    K(q, t, k)={EulerT(Vec(sum(j=1, #q, my(g=gcd(t, q[j])); g*x^(q[j]/g)) + O(x*x^k), -k))}
    S(q, t, k)={sum(j=1, #q, if(t%q[j]==0, q[j]))*vector(k,i,1)}
    a(n)={if(n==0, 1, my(s=0); forpart(q=n, s+=permcount(q)*polcoef(exp(sum(t=1, n, subst(x*Ser(K(q, t, n\t)-S(q, t, n\t))/t, x, x^t) )), n)); s/n!)} \\ Andrew Howroyd, Jan 17 2023

Extensions

Terms a(11) and beyond from Andrew Howroyd, Jan 17 2023

A360742 Number T(n,k) of sets of nonempty integer partitions with a total of k parts and total sum of n; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 2, 0, 1, 3, 3, 2, 0, 1, 4, 6, 5, 3, 0, 1, 5, 10, 10, 7, 4, 0, 1, 6, 14, 19, 16, 10, 5, 0, 1, 7, 19, 30, 32, 24, 14, 6, 0, 1, 8, 26, 46, 57, 52, 35, 19, 8, 0, 1, 9, 32, 67, 94, 97, 79, 50, 25, 10, 0, 1, 10, 40, 93, 147, 172, 157, 117, 69, 33, 12
Offset: 0

Views

Author

Alois P. Heinz, Feb 18 2023

Keywords

Examples

			T(6,3) = 10: {[1,1,4]}, {[1,2,3]}, {[2,2,2]}, {[1],[1,4]}, {[1],[2,3]}, {[2],[1,3]}, {[2],[2,2]}, {[3],[1,2]}, {[4],[1,1]}, {[1],[2],[3]}.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1, 1;
  0, 1, 2,  2;
  0, 1, 3,  3,  2;
  0, 1, 4,  6,  5,  3;
  0, 1, 5, 10, 10,  7,  4;
  0, 1, 6, 14, 19, 16, 10,  5;
  0, 1, 7, 19, 30, 32, 24, 14,  6;
  0, 1, 8, 26, 46, 57, 52, 35, 19,  8;
  0, 1, 9, 32, 67, 94, 97, 79, 50, 25, 10;
  ...
		

Crossrefs

Columns k=0-2 give: A000007, A057427, A001477(n-1) for n>=1.
Main diagonal gives A000009.
T(n+2,n+1) gives A036469.
Row sums give A261049.
T(2n,n) gives A360714.
Cf. A000041, A055884 (similar triangle for multisets), A330463.

Programs

  • Maple
    h:= proc(n, i) option remember; expand(`if`(n=0, 1,
          `if`(i<1, 0, h(n, i-1)+x*h(n-i, min(n-i, i)))))
        end:
    g:= proc(n, i, j) option remember; expand(`if`(j=0, 1, `if`(i<0, 0, add(
          g(n, i-1, j-k)*x^(i*k)*binomial(coeff(h(n$2), x, i), k), k=0..j))))
        end:
    b:= proc(n, i) option remember; expand(`if`(n=0, 1,
         `if`(i<1, 0, add(b(n-i*j, i-1)*g(i$2, j), j=0..n/i))))
        end:
    T:= (n, k)-> coeff(b(n$2), x, k):
    seq(seq(T(n, k), k=0..n), n=0..12);
  • Mathematica
    h[n_, i_] := h[n, i] = Expand[If[n == 0, 1, If[i < 1, 0, h[n, i - 1] + x*h[n - i, Min[n - i, i]]]]];
    g[n_, i_, j_] := g[n, i, j] = Expand[If[j == 0, 1, If[i < 0, 0, Sum[       g[n, i - 1, j - k]*x^(i*k)*Binomial[Coefficient[h[n, n], x, i], k], {k, 0, j}]]]];
    b[n_, i_] := b[n, i] = Expand[If[n == 0, 1, If[i < 1, 0, Sum[b[n - i*j, i - 1]*g[i, i, j], {j, 0, n/i}]]]];
    T[n_, k_] := Coefficient[b[n, n], x, k];
    Table[Table[T[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* Jean-François Alcover, Nov 15 2023, after Alois P. Heinz *)

Formula

T(n,n) + T(n+1,n) = T(n+2,n+1) for n>=0.

A360763 Number T(n,k) of multisets of nonempty strict integer partitions with a total of k parts and total sum of n; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 2, 1, 0, 1, 4, 4, 2, 1, 0, 1, 5, 8, 5, 2, 1, 0, 1, 6, 11, 10, 5, 2, 1, 0, 1, 7, 16, 18, 11, 5, 2, 1, 0, 1, 8, 22, 28, 22, 12, 5, 2, 1, 0, 1, 9, 28, 45, 39, 24, 12, 5, 2, 1, 0, 1, 10, 35, 63, 67, 46, 25, 12, 5, 2, 1, 0, 1, 11, 44, 89, 106, 86, 50, 26, 12, 5, 2, 1
Offset: 0

Views

Author

Alois P. Heinz, Feb 19 2023

Keywords

Comments

T(n,k) is defined for all n >= 0 and k >= 0. Terms that are not in the triangle are zero.
Reversed rows and also the columns converge to A360785.

Examples

			T(6,1) = 1: {[6]}.
T(6,2) = 5: {[1],[5]}, {[2],[4]}, {[3],[3]}, {[1,5]}, {[2,4]}.
T(6,3) = 8: {[1,2,3]}, {[1],[1,4]}, {[1],[2,3]}, {[2],[1,3]}, {[3],[1,2]}, {[1],[1],[4]}, {[1],[2],[3]}, {[2],[2],[2]}.
T(6,4) = 5: {[1],[1],[1],[3]}, {[1],[1],[2],[2]}, {[1],[1],[1,3]}, {[1],[2],[1,2]}, {[1,2],[1,2]}.
T(6,5) = 2: {[1],[1],[1],[1],[2]}, {[1],[1],[1],[1,2]}.
T(6,6) = 1: {[1],[1],[1],[1],[1],[1]}.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1, 1;
  0, 1, 2,  1;
  0, 1, 3,  2,  1;
  0, 1, 4,  4,  2,  1;
  0, 1, 5,  8,  5,  2,  1;
  0, 1, 6, 11, 10,  5,  2,  1;
  0, 1, 7, 16, 18, 11,  5,  2, 1;
  0, 1, 8, 22, 28, 22, 12,  5, 2, 1;
  0, 1, 9, 28, 45, 39, 24, 12, 5, 2, 1;
  ...
		

Crossrefs

Columns k=0-2 give: A000007, A057427, A001477(n-1) for n>=1.
Row sums give A089259.
T(2n,n) gives A360784.
T(3n,2n) gives A360785.

Programs

  • Maple
    h:= proc(n, i) option remember; expand(`if`(n=0, 1,
          `if`(i<1, 0, h(n, i-1)+x*h(n-i, min(n-i, i-1)))))
        end:
    g:= proc(n, i, j) option remember; expand(`if`(j=0, 1, `if`(i<0, 0, add(
          g(n, i-1, j-k)*x^(i*k)*binomial(coeff(h(n$2), x, i)+k-1, k), k=0..j))))
        end:
    b:= proc(n, i) option remember; expand(`if`(n=0, 1,
         `if`(i<1, 0, add(b(n-i*j, i-1)*g(i$2, j), j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2)):
    seq(T(n), n=0..12);
  • Mathematica
    h[n_, i_] := h[n, i] = Expand[If[n == 0, 1, If[i < 1, 0, h[n, i - 1] + x*h[n - i, Min[n - i, i - 1]]]]];
    g[n_, i_, j_] := g[n, i, j] = Expand[If[j == 0, 1, If[i < 0, 0, Sum[g[n, i - 1, j - k]*x^(i*k)*Binomial[Coefficient[h[n, n], x, i] + k - 1, k], {k, 0, j}]]]];
    b[n_, i_] := b[n, i] = Expand[If[n == 0, 1, If[i < 1, 0, Sum[b[n - i*j, i - 1]*g[i, i, j], {j, 0, n/i}]]]];
    T[n_] := CoefficientList[b[n, n], x];
    Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Sep 12 2023, after Alois P. Heinz *)

Formula

T(3n,2n) = A360785(n) = T(3n+j,2n+j) for j>=0.

A345907 Triangle giving the main antidiagonals of the matrices counting integer compositions by length and alternating sum (A345197).

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 2, 2, 1, 1, 0, 0, 4, 3, 1, 1, 0, 0, 3, 6, 4, 1, 1, 0, 0, 6, 9, 8, 5, 1, 1, 0, 0, 0, 18, 18, 10, 6, 1, 1, 0, 0, 0, 10, 36, 30, 12, 7, 1, 1, 0, 0, 0, 20, 40, 60, 45, 14, 8, 1, 1, 0, 0, 0, 0, 80, 100, 90, 63, 16, 9, 1, 1
Offset: 0

Views

Author

Gus Wiseman, Jul 26 2021

Keywords

Comments

The matrices (A345197) count the integer compositions of n of length k with alternating sum i, where 1 <= k <= n, and i ranges from -n + 2 to n in steps of 2. Here, the alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.
Problem: What are the column sums? They appear to match A239201, but it is not clear why.

Examples

			Triangle begins:
   1
   1   1
   0   1   1
   0   1   1   1
   0   2   2   1   1
   0   0   4   3   1   1
   0   0   3   6   4   1   1
   0   0   6   9   8   5   1   1
   0   0   0  18  18  10   6   1   1
   0   0   0  10  36  30  12   7   1   1
   0   0   0  20  40  60  45  14   8   1   1
   0   0   0   0  80 100  90  63  16   9   1   1
   0   0   0   0  35 200 200 126  84  18  10   1   1
   0   0   0   0  70 175 400 350 168 108  20  11   1   1
   0   0   0   0   0 350 525 700 560 216 135  22  12   1   1
		

Crossrefs

Row sums are A163493.
Rows are the antidiagonals of the matrices given by A345197.
The main diagonals of A345197 are A346632, with sums A345908.
A011782 counts compositions.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A316524 gives the alternating sum of prime indices (reverse: A344616).
Other diagonals are A008277 of A318393 and A055884 of A320808.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
- k = 0: counted by A088218, ranked by A344619/A344619.
- k = 1: counted by A000984, ranked by A345909/A345911.
- k = -1: counted by A001791, ranked by A345910/A345912.
- k = 2: counted by A088218, ranked by A345925/A345922.
- k = -2: counted by A002054, ranked by A345924/A345923.
- k >= 0: counted by A116406, ranked by A345913/A345914.
- k <= 0: counted by A058622(n-1), ranked by A345915/A345916.
- k > 0: counted by A027306, ranked by A345917/A345918.
- k < 0: counted by A294175, ranked by A345919/A345920.
- k != 0: counted by A058622, ranked by A345921/A345921.
- k even: counted by A081294, ranked by A053754/A053754.
- k odd: counted by A000302, ranked by A053738/A053738.

Programs

  • Mathematica
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    Table[Table[Length[Select[Join@@Permutations/@IntegerPartitions[n,{n-k}],k==(n+ats[#])/2-1&]],{k,0,n-1}],{n,0,15}]
Showing 1-10 of 17 results. Next