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 25 results. Next

A006980 Compositions: 6th column of A048004.

Original entry on oeis.org

1, 2, 5, 12, 28, 64, 143, 315, 687, 1485, 3186, 6792, 14401, 30391, 63872, 133751, 279177, 581040, 1206151, 2497895, 5161982, 10646564, 21919161, 45052841, 92461171, 189489255, 387830160, 792810956, 1618840800, 3301999647
Offset: 6

Views

Author

Keywords

Comments

a(n) is the number of binary strings of length n-1 whose longest run of 1s has length 5. - Félix Balado, May 20 2025

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • J. L. Yucas, Counting special sets of binary Lyndon words, Ars Combin., 31 (1991), 21-29.

Crossrefs

Programs

  • Maple
    a:= n-> (Matrix(11, (i,j)-> if i=j-1 then 1 elif j=1 then [2, 1, 0, -1, -2, -4, -5, -4, -3, -2, -1][i] else 0 fi)^n) [1,7]: seq(a(n), n=6..40); # Alois P. Heinz, Oct 29 2008
  • PARI
    Vec(1/(1-x-x^2-x^3-x^4-x^5)/(1-x-x^2-x^3-x^4-x^5-x^6)+O(x^99)) \\ Charles R Greathouse IV, Jan 10 2013

Formula

G.f.: x^6 / ((1-x-x^2-x^3-x^4-x^5) * (1-x-x^2-x^3-x^4-x^5-x^6)). - Alois P. Heinz, Oct 29 2008
G.f.: x^6 * (1-x)^2 / ((1-2*x+x^6) * (1-2*x+x^7)). - Félix Balado, May 20 2025

Extensions

Corrected definition: 6th column of A048004. - Geoffrey Critzer, Nov 09 2008

A125105 Triangular array with the first half of the odd-indexed rows of A048004.

Original entry on oeis.org

1, 1, 4, 1, 12, 11, 1, 33, 47, 27, 1, 88, 185, 127, 63, 1, 232, 694, 563, 303, 143, 1, 609, 2526, 2400, 1394, 687, 319, 1, 1596, 9012, 9960, 6215, 3186, 1519, 703, 1, 4180, 31709, 40534, 27095, 14401, 7026, 3311, 1535, 1, 10945, 110469, 162538, 116143, 63872, 31808, 15218, 7151, 3327
Offset: 1

Views

Author

Alford Arnold, Dec 07 2006

Keywords

Comments

A000079 counts compositions admitting a variety of triangular views; for example, A048004 and A105147. The subtable formed from the odd rows of A048004 has row sums 1, 8, 44, 208, 912, ... . Because only the first half of rows of A048004 is transferred to this triangle here, there is a difference between row sums of A048004 and row sums here, A045623(n-1).

Examples

			The odd-indexed rows of triangle A048004 begin
  1  1
  1  4  2 1
  1 12 11 5 2 1
  ...
so the triangle here begins
  1
  1  4
  1 12 11
  ...
		

Crossrefs

Programs

  • Maple
    A048004 := proc(n,k) option remember ; if k < 0 or k > n then 0; elif k = 0 or k = n then 1; else 2*procname(n-1,k)+procname(n-1,k-1)-2*procname(n-2,k-1)+procname(n-k-1,k-1)-procname(n-k-2,k) ; fi ; end:
    A125105 := proc(n,k) A048004(2*n-1,k) ; end:
    for n from 1 to 13 do for k from 0 to n-1 do printf("%d ",A125105(n,k)) ; od: od: # R. J. Mathar, Nov 23 2007
  • Mathematica
    B[n_, k_] := B[n, k] = If[n == 0 || k == 1, 1, Sum[B[n - j, k], {j, 1, Min[n, k]}]];
    A048004[n_, k_] := B[n + 1, k + 1] - B[n + 1, k];
    T[n_, k_] := A048004[2 n - 1, k];
    Table[T[n, k], {n, 1, 10}, {k, 0, n - 1}] // Flatten (* Jean-François Alcover, Jan 27 2024, after Maple code here and in A048004 *)

Formula

T(n,k) = A048004(2*n-1,k), 0 <= k < n. - R. J. Mathar, Nov 23 2007

Extensions

More terms from R. J. Mathar, Nov 23 2007

A097805 Number of compositions of n with k parts, T(n, k) = binomial(n-1, k-1) for n, k >= 1 and T(n, 0) = 0^n, triangle read by rows for n >= 0 and 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 3, 1, 0, 1, 4, 6, 4, 1, 0, 1, 5, 10, 10, 5, 1, 0, 1, 6, 15, 20, 15, 6, 1, 0, 1, 7, 21, 35, 35, 21, 7, 1, 0, 1, 8, 28, 56, 70, 56, 28, 8, 1, 0, 1, 9, 36, 84, 126, 126, 84, 36, 9, 1, 0, 1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1, 0, 1, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 1
Offset: 0

Views

Author

Paul Barry, Aug 25 2004

Keywords

Comments

Previous name was: Riordan array (1, 1/(1-x)) read by rows.
Note this Riordan array would be denoted (1, x/(1-x)) by some authors.
Columns have g.f. (x/(1-x))^k. Reverse of A071919. Row sums are A011782. Antidiagonal sums are Fibonacci(n-1). Inverse as Riordan array is (1, 1/(1+x)). A097805=B*A059260*B^(-1), where B is the binomial matrix.
(0,1)-Pascal triangle. - Philippe Deléham, Nov 21 2006
(n+1) * each term of row n generates triangle A127952: (1; 0, 2; 0, 3, 3; 0, 4, 8, 4; ...). - Gary W. Adamson, Feb 09 2007
Triangle T(n,k), 0<=k<=n, read by rows, given by [0,1,0,0,0,0,0,...] DELTA [1,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938. - Philippe Deléham, Dec 12 2008
From Paul Weisenhorn, Feb 09 2011: (Start)
Triangle read by rows: T(r,c) is the number of unordered partitions of n=r*(r+1)/2+c into (r+1) parts < (r+1) and at most pairs of equal parts and parts in neighboring pairs have difference 2.
Triangle read by rows: T(r,c) is the number of unordered partitions of the number n=r*(r+1)/2+(c-1) into r parts < (r+1) and at most pairs of equal parts and parts in neighboring pairs have difference 2. (End)
Triangle read by rows: T(r,c) is the number of ordered partitions (compositions) of r into c parts. - Juergen Will, Jan 04 2016
From Tom Copeland, Oct 25 2012: (Start)
Given a basis composed of a sequence of polynomials p_n(x) characterized by ladder (creation / annihilation, or raising / lowering) operators defined by R p_n(x) = p_(n+1)(x) and L p_n(x) = n p_(n-1)(x) with p_0(x)=1, giving the number operator # p_n(x) = RL p_n(x) = n p_n(x), the lower triangular padded Pascal matrix Pd (A097805) serves as a matrix representation of the operator exp(R^2*L) = exp(R#) =
1) exp(x^2D) for the set x^n and
2) D^(-1) exp(t*x)D for the set x^n/n! (see A218234).
(End)
From James East, Apr 11 2014: (Start)
Square array a(m,n) with m,n=0,1,2,... read by off-diagonals.
a(m,n) gives the number of order-preserving functions f:{1,...,m}->{1,...,n}. Order-preserving means that x
a(n,n)=A088218(n) is the size of the semigroup O_n of all order-preserving transformations of {1,...,n}.
Read as a triangle, this sequence may be obtained by augmenting Pascal's triangle by appending the column 1,0,0,0,... on the left.
(End)
A formula based on the partitions of n with largest part k is given as a Sage program below. The 'conjugate' formula leads to A048004. - Peter Luschny, Jul 13 2015
From Wolfdieter Lang, Feb 17 2017: (Start)
The transposed of this lower triangular Riordan matrix of the associated type T provides the transition matrix between the monomial basis {x^n}, n >= 0, and the basis {y^n}, n >= 0, with y = x/(1-x): x^0 = 1 = y^0, x^n = Sum_{m >= n} Ttrans(n,m) y^m, for n >= 1, with Ttrans(n,m) = binomial(m-1,n-1).
Therefore, if a transformation with this Riordan matrix from a sequence {a} to the sequence {b} is given by b(n) = Sum_{m=0..n} T(n, m)*a(m), with T(n, m) = binomial(n-1, m-1), for n >= 1, then Sum_{n >= 0} a(n)*x^n = Sum_{n >= 0} b(n)*y^n, with y = x/(1-x) and vice versa. This is a modified binomial transformation; the usual one belongs to the Pascal Riordan matrix A007318. (End)
From Gus Wiseman, Jan 23 2022: (Start)
Also the number of compositions of n with alternating sum k, with k ranging from -n to n in steps of 2. For example, row n = 6 counts the following compositions (empty column indicated by dot):
. (15) (24) (33) (42) (51) (6)
(141) (132) (123) (114)
(1113) (231) (222) (213)
(1212) (1122) (321) (312)
(1311) (1221) (1131) (411)
(2112) (2121)
(2211) (3111)
(11121) (11112)
(12111) (11211)
(111111) (21111)
The reverse-alternating version is the same. Counting compositions by all three parameters (sum, length, alternating sum) gives A345197. Compositions of 2n with alternating sum 2k with k ranging from -n + 1 to n are A034871. (End)
Also the convolution triangle of A000012. - Peter Luschny, Oct 07 2022
From Sergey Kitaev, Nov 18 2023: (Start)
Number of permutations of length n avoiding simultaneously the patterns 123 and 132 with k right-to-left maxima. A right-to-left maximum in a permutation a(1)a(2)...a(n) is position i such that a(j) < a(i) for all i < j.
Number of permutations of length n avoiding simultaneously the patterns 231 and 312 with k right-to-left minima (resp., left-to-right maxima). A right-to-left minimum (resp., left-to-right maximum) in a permutation a(1)a(2)...a(n) is position i such that a(j) > a(i) for all j > i (resp., a(j) < a(i) for all j < i).
Number of permutations of length n avoiding simultaneously the patterns 213 and 312 with k right-to-left maxima (resp., left-to-right maxima).
Number of permutations of length n avoiding simultaneously the patterns 213 and 231 with k right-to-left maxima (resp., right-to-left minima). (End)

Examples

			G.f. = 1 + x * (x + x^3 * (1 + x) + x^6 * (1 + x)^2 + x^10 * (1 + x)^3 + ...). - _Michael Somos_, Aug 20 2006
The triangle T(n, k) begins:
n\k  0 1 2  3  4   5   6  7  8 9 10 ...
0:   1
1:   0 1
2:   0 1 1
3:   0 1 2  1
4:   0 1 3  3  1
5:   0 1 4  6  4   1
6:   0 1 5 10 10   5   1
7:   0 1 6 15 20  15   6  1
8:   0 1 7 21 35  35  21  7  1
9:   0 1 8 28 56  70  56 28  8 1
10:  0 1 9 36 84 126 126 84 36 9  1
... reformatted _Wolfdieter Lang_, Jul 31 2017
From _Paul Weisenhorn_, Feb 09 2011: (Start)
T(r=5,c=3) = binomial(4,2) = 6 unordered partitions of the number n = r*(r+1)/2+c = 18 with (r+1)=6 summands: (5+5+4+2+1+1), (5+5+3+3+1+1), (5+4+4+3+1+1), (5+5+3+2+2+1), (5+4+4+2+2+1), (5+4+3+3+2+1).
T(r=5,c=3) = binomial(4,2) = 6 unordered partitions of the number n = r*(r+1)/2+(c-1) = 17 with r=5 summands: (5+5+4+2+1), (5+5+3+3+1), (5+5+3+2+2), (5+4+4+3+1), (5+4+4+2+2), (5+4+3+3+2).  (End)
From _James East_, Apr 11 2014: (Start)
a(0,0)=1 since there is a unique (order-preserving) function {}->{}.
a(m,0)=0 for m>0 since there is no function from a nonempty set to the empty set.
a(3,2)=4 because there are four order-preserving functions {1,2,3}->{1,2}: these are [1,1,1], [2,2,2], [1,1,2], [1,2,2]. Here f=[a,b,c] denotes the function defined by f(1)=a, f(2)=b, f(3)=c.
a(2,3)=6 because there are six order-preserving functions {1,2}->{1,2,3}: these are [1,1], [1,2], [1,3], [2,2], [2,3], [3,3].
(End)
		

References

  • D. E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Part 1, Section 7.2.1.3, 2011.

Crossrefs

Case m=0 of the polynomials defined in A278073.
Cf. A000012 (diagonal), A011782 (row sums), A088218 (central terms).
The terms just left of center in odd-indexed rows are A001791, even A002054.
The odd-indexed rows are A034871.
Row sums without the center are A058622.
The unordered version is A072233, without zeros A008284.
Right half without center has row sums A027306(n-1).
Right half with center has row sums A116406(n).
Left half without center has row sums A294175(n-1).
Left half with center has row sums A058622(n-1).
A025047 counts alternating compositions.
A098124 counts balanced compositions, unordered A047993.
A106356 counts compositions by number of maximal anti-runs.
A344651 counts partitions by sum and alternating sum.
A345197 counts compositions by sum, length, and alternating sum.

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, p!, `if`(i<1, 0,
          expand(add(b(n-i*j, i-1, p+j)/j!*x^j, j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2, 0)):
    seq(T(n), n=0..20);  # Alois P. Heinz, May 25 2014
    # Alternatively:
    T := proc(k,n) option remember;
    if k=n then 1 elif k=0 then 0 else
    add(T(k-1,n-i), i=1..n-k+1) fi end:
    A097805 := (n,k) -> T(k,n):
    for n from 0 to 12 do seq(A097805(n,k), k=0..n) od; # Peter Luschny, Mar 12 2016
    # Uses function PMatrix from A357368.
    PMatrix(10, n -> 1);  # Peter Luschny, Oct 07 2022
  • Mathematica
    T[0, 0] = 1; T[n_, k_] := Binomial[n-1, k-1]; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Sep 03 2014, after Paul Weisenhorn *)
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[#]==k&]],{n,0,10},{k,0,n}] (* Gus Wiseman, Jan 23 2022 *)
  • PARI
    {a(n) = my(m); if( n<2, n==0, n--; m = (sqrtint(8*n + 1) - 1)\2; binomial(m-1, n - m*(m + 1)/2))}; /* Michael Somos, Aug 20 2006 */
    
  • PARI
    T(n,k) = if (k==0, 0^n, binomial(n-1, k-1)); \\ Michel Marcus, May 06 2022
    
  • PARI
    row(n) = vector(n+1, k, k--; if (k==0, 0^n, binomial(n-1, k-1))); \\ Michel Marcus, May 06 2022
    
  • Python
    from math import comb
    def T(n, k): return comb(n-1, k-1) if k != 0 else k**n  # Peter Luschny, May 06 2022
  • Sage
    # Illustrates a basic partition formula, is not efficient as a program for large n.
    def A097805_row(n):
        r = []
        for k in (0..n):
            s = 0
            for q in Partitions(n, max_part=k, inner=[k]):
                s += mul(binomial(q[j],q[j+1]) for j in range(len(q)-1))
            r.append(s)
        return r
    [A097805_row(n) for n in (0..9)] # Peter Luschny, Jul 13 2015
    

Formula

Number triangle T(n, k) defined by T(n,k) = Sum_{j=0..n} binomial(n, j)*if(k<=j, (-1)^(j-k), 0).
T(r,c) = binomial(r-1,c-1), 0 <= c <= r. - Paul Weisenhorn, Feb 09 2011
G.f.: (-1+x)/(-1+x+x*y). - R. J. Mathar, Aug 11 2015
a(0,0) = 1, a(n,k) = binomial(n-1,n-k) = binomial(n-1,k-1) Juergen Will, Jan 04 2016
G.f.: (x^1 + x^2 + x^3 + ...)^k = (x/(1-x))^k. - Juergen Will, Jan 04 2016
From Tom Copeland, Nov 15 2016: (Start)
E.g.f.: 1 + x*[e^((x+1)t)-1]/(x+1).
This padded Pascal matrix with the odd columns negated is NpdP = M*S = S^(-1)*M^(-1) = S^(-1)*M, where M(n,k) = (-1)^n A130595(n,k), the inverse Pascal matrix with the odd rows negated, S is the summation matrix A000012, the lower triangular matrix with all elements unity, and S^(-1) = A167374, a finite difference matrix. NpdP is self-inverse, i.e., (M*S)^2 = the identity matrix, and has the e.g.f. 1 - x*[e^((1-x)t)-1]/(1-x).
M = NpdP*S^(-1) follows from the well-known recursion property of the Pascal matrix, implying NpdP = M*S.
The self-inverse property of -NpdP is implied by the self-inverse relation of its embedded signed Pascal submatrix M (cf. A130595). Also see A118800 for another proof.
Let P^(-1) be A130595, the inverse Pascal matrix. Then T = A200139*P^(-1) and T^(-1) = padded P^(-1) = P*A097808*P^(-1). (End)
The center (n>0) is T(2n+1,n+1) = A000984(n) = 2*A001700(n-1) = 2*A088218(n) = A126869(2n) = 2*A138364(2n-1). - Gus Wiseman, Jan 25 2022

Extensions

Corrected by Philippe Deléham, Oct 05 2005
New name using classical terminology by Peter Luschny, Feb 05 2019

A131689 Triangle of numbers T(n,k) = k!*Stirling2(n,k) = A000142(k)*A048993(n,k) read by rows, T(n, k) for 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 1, 6, 6, 0, 1, 14, 36, 24, 0, 1, 30, 150, 240, 120, 0, 1, 62, 540, 1560, 1800, 720, 0, 1, 126, 1806, 8400, 16800, 15120, 5040, 0, 1, 254, 5796, 40824, 126000, 191520, 141120, 40320, 0, 1, 510, 18150, 186480, 834120, 1905120, 2328480, 1451520, 362880
Offset: 0

Author

Philippe Deléham, Sep 14 2007

Keywords

Comments

Triangle T(n,k), 0 <= k <= n, read by rows given by [0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,...] DELTA [1,1,2,2,3,3,4,4,5,5,6,6,...] where DELTA is the operator defined in A084938; another version of A019538.
See also A019538: version with n > 0 and k > 0. - Philippe Deléham, Nov 03 2008
From Peter Bala, Jul 21 2014: (Start)
T(n,k) gives the number of (k-1)-dimensional faces in the interior of the first barycentric subdivision of the standard (n-1)-dimensional simplex. For example, the barycentric subdivision of the 1-simplex is o--o--o, with 1 interior vertex and 2 interior edges, giving T(2,1) = 1 and T(2,2) = 2.
This triangle is used when calculating the face vectors of the barycentric subdivision of a simplicial complex. Let S be an n-dimensional simplicial complex and write f_k for the number of k-dimensional faces of S, with the usual convention that f_(-1) = 1, so that F := (f_(-1), f_0, f_1,...,f_n) is the f-vector of S. If M(n) denotes the square matrix formed from the first n+1 rows and n+1 columns of the present triangle, then the vector F*M(n) is the f-vector of the first barycentric subdivision of the simplicial complex S (Brenti and Welker, Lemma 2.1). For example, the rows of Pascal's triangle A007318 (but with row and column indexing starting at -1) are the f-vectors for the standard n-simplexes. It follows that A007318*A131689, which equals A028246, is the array of f-vectors of the first barycentric subdivision of standard n-simplexes. (End)
This triangle T(n, k) appears in the o.g.f. G(n, x) = Sum_{m>=0} S(n, m)*x^m with S(n, m) = Sum_{j=0..m} j^n for n >= 1 as G(n, x) = Sum_{k=1..n} (x^k/(1 - x)^(k+2))*T(n, k). See also the Eulerian triangle A008292 with a Mar 31 2017 comment for a rewritten form. For the e.g.f. see A028246 with a Mar 13 2017 comment. - Wolfdieter Lang, Mar 31 2017
T(n,k) = the number of alignments of length k of n strings each of length 1. See Slowinski. An example is given below. Cf. A122193 (alignments of strings of length 2) and A299041 (alignments of strings of length 3). - Peter Bala, Feb 04 2018
The row polynomials R(n,x) are the Fubini polynomials. - Emanuele Munarini, Dec 05 2020
From Gus Wiseman, Feb 18 2022: (Start)
Also the number of patterns of length n with k distinct parts (or with maximum part k), where we define a pattern to be a finite sequence covering an initial interval of positive integers. For example, row n = 3 counts the following patterns:
(1,1,1) (1,2,2) (1,2,3)
(2,1,2) (1,3,2)
(2,2,1) (2,1,3)
(1,1,2) (2,3,1)
(1,2,1) (3,1,2)
(2,1,1) (3,2,1)
(End)
Regard A048994 as a lower-triangular matrix and divide each term A048994(n,k) by n!, then this is the matrix inverse. Because Sum_{k=0..n} (A048994(n,k) * x^n / n!) = A007318(x,n), Sum_{k=0..n} (A131689(n,k) * A007318(x,k)) = x^n. - Natalia L. Skirrow, Mar 23 2023
T(n,k) is the number of ordered partitions of [n] into k blocks. - Alois P. Heinz, Feb 21 2025

Examples

			The triangle T(n,k) begins:
  n\k 0 1    2     3      4       5        6        7        8        9      10 ...
  0:  1
  1:  0 1
  2:  0 1    2
  3:  0 1    6     6
  4:  0 1   14    36     24
  5:  0 1   30   150    240     120
  6:  0 1   62   540   1560    1800      720
  7:  0 1  126  1806   8400   16800    15120     5040
  8:  0 1  254  5796  40824  126000   191520   141120    40320
  9:  0 1  510 18150 186480  834120  1905120  2328480  1451520   362880
  10: 0 1 1022 55980 818520 5103000 16435440 29635200 30240000 16329600 3628800
  ... reformatted and extended. - _Wolfdieter Lang_, Mar 31 2017
From _Peter Bala_, Feb 04 2018: (Start)
T(4,2) = 14 alignments of length 2 of 4 strings of length 1. Examples include
  (i) A -    (ii) A -    (iii) A -
      B -         B -          - B
      C -         - C          - C
      - D         - D          - D
There are C(4,1) = 4 alignments of type (i) with a single gap character - in column 1, C(4,2) = 6 alignments of type (ii) with two gap characters in column 1 and C(4,3) = 4 alignments of type (iii) with three gap characters in column 1, giving a total of 4 + 6 + 4 = 14 alignments. (End)
		

Crossrefs

Case m=1 of the polynomials defined in A278073.
Cf. A000142 (diagonal), A000670 (row sums), A000012 (alternating row sums), A210029 (central terms).
Cf. A008292, A028246 (o.g.f. and e.g.f. of sums of powers).
A version for partitions is A116608, or by maximum A008284.
A version for compositions is A235998, or by maximum A048004.
Classes of patterns:
- A000142 = strict
- A005649 = anti-run, complement A069321
- A019536 = necklace
- A032011 = distinct multiplicities
- A060223 = Lyndon
- A226316 = (1,2,3)-avoiding, weakly A052709, complement A335515
- A296975 = aperiodic
- A345194 = alternating, up/down A350354, complement A350252
- A349058 = weakly alternating
- A351200 = distinct runs
- A351292 = distinct run-lengths

Programs

  • Julia
    function T(n, k)
        if k < 0 || k > n return 0 end
        if n == 0 && k == 0 return 1 end
        k*(T(n-1, k-1) + T(n-1, k))
    end
    for n in 0:7
        println([T(n, k) for k in 0:n])
    end
    # Peter Luschny, Mar 26 2020
    
  • Maple
    A131689 := (n,k) -> Stirling2(n,k)*k!: # Peter Luschny, Sep 17 2011
    # Alternatively:
    A131689_row := proc(n) 1/(1-t*(exp(x)-1)); expand(series(%,x,n+1)); n!*coeff(%,x,n); PolynomialTools:-CoefficientList(%,t) end:
    for n from 0 to 9 do A131689_row(n) od; # Peter Luschny, Jan 23 2017
  • Mathematica
    t[n_, k_] := k!*StirlingS2[n, k]; Table[t[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 25 2014 *)
    T[n_, k_] := If[n <= 0 || k <= 0, Boole[n == 0 && k == 0], Sum[(-1)^(i + k) Binomial[k, i] i^(n + k), {i, 0, k}]]; (* Michael Somos, Jul 08 2018 *)
  • PARI
    {T(n, k) = if( n<0, 0, sum(i=0, k, (-1)^(k + i) * binomial(k, i) * i^n))};
    /* Michael Somos, Jul 08 2018 */
    
  • SageMath
    @cached_function
    def F(n): # Fubini polynomial
        R. = PolynomialRing(ZZ)
        if n == 0: return R(1)
        return R(sum(binomial(n, k)*F(n - k)*x for k in (1..n)))
    for n in (0..9): print(F(n).list()) # Peter Luschny, May 21 2021

Formula

T(n,k) = k*(T(n-1,k-1) + T(n-1,k)) with T(0,0)=1. Sum_{k=0..n} T(n,k)*x^k = (-1)^n*A000629(n), A033999(n), A000007(n), A000670(n), A004123(n+1), A032033(n), A094417(n), A094418(n), A094419(n) for x = -2, -1, 0, 1, 2, 3, 4, 5, 6 respectively. [corrected by Philippe Deléham, Feb 11 2013]
Sum_{k=0..n} T(n,k)*x^(n-k) = A000012(n), A000142(n), A000670(n), A122704(n) for x=-1, 0, 1, 2 respectively. - Philippe Deléham, Oct 09 2007
Sum_{k=0..n} (-1)^k*T(n,k)/(k+1) = Bernoulli numbers A027641(n)/A027642(n). - Peter Luschny, Sep 17 2011
G.f.: F(x,t) = 1 + x*t + (x+x^2)*t^2/2! + (x+6*x^2+6*x^3)*t^3/3! + ... = Sum_{n>=0} R(n,x)*t^n/n!.
The row polynomials R(n,x) satisfy the recursion R(n+1,x) = (x+x^2)*R'(n,x) + x*R(n,x) where ' indicates differentiation with respect to x. - Philippe Deléham, Feb 11 2013
T(n,k) = [t^k] (n! [x^n] (1/(1-t*(exp(x)-1)))). - Peter Luschny, Jan 23 2017
The n-th row polynomial has the form x o x o ... o x (n factors), where o denotes the black diamond multiplication operator of Dukes and White. See also Bala, Example E8. - Peter Bala, Jan 08 2018

A069916 Number of log-concave compositions (ordered partitions) of n.

Original entry on oeis.org

1, 1, 2, 4, 6, 9, 14, 20, 26, 36, 47, 60, 80, 102, 127, 159, 194, 236, 291, 355, 425, 514, 611, 718, 856, 1009, 1182, 1381, 1605, 1861, 2156, 2496, 2873, 3299, 3778, 4301, 4902, 5574, 6325, 7176, 8116, 9152, 10317, 11610, 13028, 14611, 16354, 18259, 20365
Offset: 0

Author

Pontus von Brömssen, Apr 24 2002

Keywords

Comments

These are compositions with weakly decreasing first quotients, where the first quotients of a sequence are defined as if the sequence were an increasing divisor chain, so for example the first quotients of (6,3,1) are (1/2,1/3). - Gus Wiseman, Mar 16 2021

Examples

			Out of the 8 compositions of 4, only 2+1+1 and 1+1+2 are not log-concave, so a(4)=6.
From _Gus Wiseman_, Mar 15 2021: (Start)
The a(1) = 1 through a(6) = 14 compositions:
  (1)  (2)   (3)    (4)     (5)      (6)
       (11)  (12)   (13)    (14)     (15)
             (21)   (22)    (23)     (24)
             (111)  (31)    (32)     (33)
                    (121)   (41)     (42)
                    (1111)  (122)    (51)
                            (131)    (123)
                            (221)    (132)
                            (11111)  (141)
                                     (222)
                                     (231)
                                     (321)
                                     (1221)
                                     (111111)
(End)
		

Crossrefs

The version for differences instead of quotients is A070211.
A000005 counts constant compositions.
A000009 counts strictly increasing (or strictly decreasing) compositions.
A000041 counts weakly increasing (or weakly decreasing) compositions.
A001055 counts factorizations.
A002843 counts compositions with adjacent parts x <= 2y.
A003238 counts chains of divisors summing to n-1, with strict case A122651.
A003242 counts anti-run compositions.
A074206 counts ordered factorizations.
A167865 counts strict chains of divisors summing to n.

Programs

  • Mathematica
    (* This program is not suitable for computing a large number of terms *)
    compos[n_] := Permutations /@ IntegerPartitions[n] // Flatten[#, 1]&;
    logConcaveQ[p_] := And @@ Table[p[[i]]^2 >= p[[i-1]]*p[[i+1]], {i, 2, Length[p]-1}]; a[n_] := Count[compos[n], p_?logConcaveQ]; Table[an = a[n]; Print["a(", n, ") = ", an]; a[n], {n, 0, 25}] (* Jean-François Alcover, Feb 29 2016 *)
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],GreaterEqual@@Divide@@@Reverse/@Partition[#,2,1]&]],{n,0,15}] (* Gus Wiseman, Mar 15 2021 *)
  • Sage
    def A069916(n) : return sum(all(p[i]^2 >= p[i-1] * p[i+1] for i in range(1, len(p)-1)) for p in Compositions(n)) # Eric M. Schmidt, Sep 29 2013

A264401 Triangle read by rows: T(n,k) is the number of partitions of n having least gap k.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 3, 2, 4, 4, 2, 1, 4, 6, 4, 1, 7, 8, 5, 2, 8, 11, 8, 3, 12, 15, 10, 4, 1, 14, 20, 15, 6, 1, 21, 26, 19, 9, 2, 24, 35, 27, 12, 3, 34, 45, 34, 17, 5, 41, 58, 47, 23, 6, 1, 55, 75, 59, 31, 10, 1, 66, 96, 79, 41, 13, 2
Offset: 0

Author

Emeric Deutsch, Nov 21 2015

Keywords

Comments

The "least gap" or "mex" of a partition is the least positive integer that is not a part of the partition. For example, the least gap of the partition [7,4,2,2,1] is 3.
Sum of entries in row n is A000041(n).
T(n,1) = A002865(n).
Sum_{k>=1} k*T(n,k) = A022567(n).

Examples

			Row n=5 is 2,3,2; indeed, the least gaps of [5], [4,1], [3,2], [3,1,1], [2,2,1], [2,1,1,1], and [1,1,1,1,1] are 1, 2, 1, 2, 3, 3, and 2, respectively (i.e., two 1s, three 2s, and two 3s).
Triangle begins:
   1
   0   1
   1   1
   1   1   1
   2   2   1
   2   3   2
   4   4   2   1
   4   6   4   1
   7   8   5   2
   8  11   8   3
  12  15  10   4   1
  14  20  15   6   1
  21  26  19   9   2
		

Crossrefs

Row sums are A000041.
Row lengths are A002024.
Column k = 1 is A002865.
Column k = 2 is A027336.
The strict case is A343348.
A000009 counts strict partitions.
A000041 counts partitions.
A000070 counts partitions with a selected part.
A006128 counts partitions with a selected position.
A015723 counts strict partitions with a selected part.
A257993 gives the least gap of the partition with Heinz number n.
A339564 counts factorizations with a selected factor.
A342050 ranks partitions with even least gap.
A342051 ranks partitions with odd least gap.

Programs

  • Maple
    g := (sum(t^j*x^((1/2)*j*(j-1))*(1-x^j), j = 1 .. 80))/(product(1-x^i, i = 1 .. 80)): gser := simplify(series(g, x = 0, 23)): for n from 0 to 30 do P[n] := sort(coeff(gser, x, n)) end do: for n from 0 to 25 do seq(coeff(P[n], t, j), j = 1 .. degree(P[n])) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0, `if`(i=0, [1, 0],
          [0, x]), `if`(i<1, 0, (p-> [0, p[2] +p[1]*x^i])(
          b(n, i-1)) +add(b(n-i*j, i-1), j=1..n/i)))
        end:
    T:= n->(p->seq(coeff(p, x, i), i=1..degree(p)))(b(n, n+1)[2]):
    seq(T(n), n=0..20);  # Alois P. Heinz, Nov 29 2015
  • Mathematica
    Needs["Combinatorica`"]; {1, 0}~Join~Flatten[Table[Count[Map[If[# == {}, 0, First@ #] &@ Complement[Range@ n, #] &, Combinatorica`Partitions@ n], n_ /; n == k], {n, 17}, {k, n}] /. 0 -> Nothing] (* Michael De Vlieger, Nov 21 2015 *)
    mingap[q_]:=Min@@Complement[Range[If[q=={},0,Max[q]]+1],q];Table[Length[Select[IntegerPartitions[n],mingap[#]==k&]],{n,0,15},{k,Round[Sqrt[2*(n+1)]]}] (* Gus Wiseman, Apr 19 2021 *)
    b[n_, i_] := b[n, i] = If[n == 0, If[i == 0, {1, 0}, {0, x}], If[i<1, {0, 0}, {0, #[[2]] + #[[1]]*x^i}&[b[n, i-1]] + Sum[b[n-i*j, i - 1], {j, 1, n/i}]]];
    T[n_] := CoefficientList[b[n, n + 1], x][[2]] // Rest;
    T /@ Range[0, 20] // Flatten (* Jean-François Alcover, May 21 2021, after Alois P. Heinz *)

Formula

G.f.: G(t,x) = Sum_{j>=1} (t^j*x^{j(j-1)/2}*(1-x^j))/Product_{i>=1}(1-x^i).

A092921 Array F(k, n) read by descending antidiagonals: k-generalized Fibonacci numbers in row k >= 1, starting (0, 1, 1, ...), for column n >= 0.

Original entry on oeis.org

0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 1, 0, 1, 3, 2, 1, 1, 0, 1, 5, 4, 2, 1, 1, 0, 1, 8, 7, 4, 2, 1, 1, 0, 1, 13, 13, 8, 4, 2, 1, 1, 0, 1, 21, 24, 15, 8, 4, 2, 1, 1, 0, 1, 34, 44, 29, 16, 8, 4, 2, 1, 1, 0, 1, 55, 81, 56, 31, 16, 8, 4, 2, 1, 1, 0, 1, 89, 149, 108, 61, 32, 16, 8, 4, 2, 1, 1, 0
Offset: 0

Author

Ralf Stephan, Apr 17 2004

Keywords

Comments

For all k >= 1, the k-generalized Fibonacci number F(k,n) satisfies the recurrence obtained by adding more terms to the recurrence of the Fibonacci numbers.
The number of tilings of an 1 X n rectangle with tiles of size 1 X 1, 1 X 2, ..., 1 X k is F(k,n).
T(k,n) is the number of 0-balanced ordered trees with n edges and height k (height is the number of edges from root to a leaf). - Emeric Deutsch, Jan 19 2007
Brlek et al. (2006) call this table "number of psp-polyominoes with flat bottom". - N. J. A. Sloane, Oct 30 2018

Examples

			From _Peter Luschny_, Apr 03 2021: (Start)
Array begins:
                n = 0  1  2  3  4  5   6   7   8    9   10
  -------------------------------------------------------------
  [k=1, mononacci ] 0, 1, 1, 1, 1, 1,  1,  1,  1,   1,   1, ...
  [k=2, Fibonacci ] 0, 1, 1, 2, 3, 5,  8, 13, 21,  34,  55, ...
  [k=3, tribonacci] 0, 1, 1, 2, 4, 7, 13, 24, 44,  81, 149, ...
  [k=4, tetranacci] 0, 1, 1, 2, 4, 8, 15, 29, 56, 108, 208, ...
  [k=5, pentanacci] 0, 1, 1, 2, 4, 8, 16, 31, 61, 120, 236, ...
  [k=6]             0, 1, 1, 2, 4, 8, 16, 32, 63, 125, 248, ...
  [k=7]             0, 1, 1, 2, 4, 8, 16, 32, 64, 127, 253, ...
  [k=8]             0, 1, 1, 2, 4, 8, 16, 32, 64, 128, 255, ...
  [k=9]             0, 1, 1, 2, 4, 8, 16, 32, 64, 128, 256, ...
Note that the first parameter in F(k, n) refers to rows, and the second parameter refers to columns. This is always the case. Only the usual naming convention for the indices is not adhered to because it is common to call the row sequences k-bonacci numbers. (End)
.
From _Peter Luschny_, Aug 12 2015: (Start)
As a triangle counting compositions of n with largest part k:
  [n\k]| [0][1] [2] [3] [4][5][6][7][8][9]
   [0] | [0]
   [1] | [0, 1]
   [2] | [0, 1,  1]
   [3] | [0, 1,  1,  1]
   [4] | [0, 1,  2,  1,  1]
   [5] | [0, 1,  3,  2,  1, 1]
   [6] | [0, 1,  5,  4,  2, 1, 1]
   [7] | [0, 1,  8,  7,  4, 2, 1, 1]
   [8] | [0, 1, 13, 13,  8, 4, 2, 1, 1]
   [9] | [0, 1, 21, 24, 15, 8, 4, 2, 1, 1]
For example for n=7 and k=3 we have the 7 compositions [3, 3, 1], [3, 2, 2], [3, 2, 1, 1], [3, 1, 3], [3, 1, 2, 1], [3, 1, 1, 2], [3, 1, 1, 1, 1]. (End)
		

Crossrefs

Columns converge to A166444: each column n converges to A166444(n) = 2^(n-2).
Rows 1-8 are (shifted) A057427, A000045, A000073, A000078, A001591, A001592, A066178, A079262.
Essentially a reflected version of A048887.
See A048004 and A126198 for closely related arrays.
Cf. A066099.

Programs

  • Maple
    F:= proc(k, n) option remember; `if`(n<2, n,
          add(F(k, n-j), j=1..min(k,n)))
        end:
    seq(seq(F(k, d+1-k), k=1..d+1), d=0..12);  # Alois P. Heinz, Nov 02 2016
    # Based on the above function:
    Arow := (k, len) -> seq(F(k, j), j = 0..len):
    seq(lprint(Arow(k, 14)), k = 1..10); # Peter Luschny, Apr 03 2021
  • Mathematica
    F[k_, n_] := F[k, n] = If[n<2, n, Sum[F[k, n-j], {j, 1, Min[k, n]}]];
    Table[F[k, d+1-k], {d, 0, 12}, {k, 1, d+1}] // Flatten (* Jean-François Alcover, Jan 11 2017, translated from Maple *)
  • PARI
    F(k,n)=if(n<2,if(n<1,0,1),sum(i=1,k,F(k,n-i)))
    
  • PARI
    T(m,n)=!!n*(matrix(m,m,i,j,j==i+1||i==m)^(n+m-2))[1,m] \\ M. F. Hasler, Apr 20 2018
    
  • PARI
    F(k,n) = if(n==0,0, polcoeff(lift(Mod('x, Pol(vector(k+1,i, if(i==1,1,-1))))^(n+k-2)), k-1)); \\ Kevin Ryde, Jun 05 2020
    
  • Sage
    # As a triangle of compositions of n with largest part k.
    C = lambda n,k: Compositions(n, max_part=k, inner=[k]).cardinality()
    for n in (0..9): [C(n,k) for k in (0..n)] # Peter Luschny, Aug 12 2015

Formula

F(k,n) = F(k,n-1) + F(k,n-2) + ... + F(k,n-k); F(k,1) = 1 and F(k,n) = 0 for n <= 0.
G.f.: x/(1-Sum_{i=1..k} x^i).
F(k,n) = 2^(n-2) for 1 < n <= k+1. - M. F. Hasler, Apr 20 2018
F(k,n) = Sum_{j=0..floor(n/(k+1))} (-1)^j*((n - j*k) + j + delta(n,0))/(2*(n - j*k) + delta(n,0))*binomial(n - j*k, j)*2^(n-j*(k+1)), where delta denotes the Kronecker delta (see Corollary 3.2 in Parks and Wills). - Stefano Spezia, Aug 06 2022

A342528 Number of compositions with alternating parts weakly decreasing (or weakly increasing).

Original entry on oeis.org

1, 1, 2, 4, 7, 12, 20, 32, 51, 79, 121, 182, 272, 399, 582, 839, 1200, 1700, 2394, 3342, 4640, 6397, 8771, 11955, 16217, 21878, 29386, 39285, 52301, 69334, 91570, 120465, 157929, 206313, 268644, 348674, 451185, 582074, 748830, 960676, 1229208, 1568716, 1997064
Offset: 0

Author

Gus Wiseman, Mar 24 2021

Keywords

Comments

These are finite sequences q of positive integers summing to n such that q(i) >= q(i+2) for all possible i.
The strict case (alternating parts are strictly decreasing) is A000041. Is there a bijective proof?
Yes. Construct a Ferrers diagram by placing odd parts horizontally and even parts vertically in a fishbone pattern. The resulting Ferrers diagram will be for an ordinary partition and the process is reversible. It does not appear that this method can be applied to give a formula for this sequence. - Andrew Howroyd, Mar 25 2021

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)
             (111)  (31)    (32)     (33)
                    (121)   (41)     (42)
                    (211)   (131)    (51)
                    (1111)  (212)    (141)
                            (221)    (222)
                            (311)    (231)
                            (1211)   (312)
                            (2111)   (321)
                            (11111)  (411)
                                     (1212)
                                     (1311)
                                     (2121)
                                     (2211)
                                     (3111)
                                     (12111)
                                     (21111)
                                     (111111)
		

Crossrefs

The even-length case is A114921.
The version with alternating parts unequal is A224958 (unordered: A000726).
The version with alternating parts equal is A342527.
A000041 counts weakly increasing (or weakly decreasing) compositions.
A000203 adds up divisors.
A002843 counts compositions with all adjacent parts x <= 2y.
A003242 counts anti-run compositions.
A069916/A342492 = decreasing/increasing first quotients.
A070211/A325546 = weakly decreasing/increasing differences.
A175342/A325545 = constant/distinct differences.
A342495 = constant first quotients (unordered: A342496, strict: A342515, ranking: A342522).

Programs

  • Maple
    b:= proc(n, i, j) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1, j)+b(n-i, min(n-i, j), min(n-i, i))))
        end:
    a:= n-> b(n$3):
    seq(a(n), n=0..42);  # Alois P. Heinz, Jan 16 2025
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],GreaterEqual@@Plus@@@Reverse/@Partition[#,2,1]&]],{n,0,15}]
  • PARI
    seq(n)={my(p=1/prod(k=1, n, 1-y*x^k + O(x*x^n))); Vec(1+sum(k=1, n, polcoef(p,k,y)*(polcoef(p,k-1,y) + polcoef(p,k,y))))} \\ Andrew Howroyd, Mar 24 2021

Formula

G.f.: Sum_{k>=0} ([y^k] P(x,y))*([y^k] (1 + y)*P(x,y)), where P(x,y) = Product_{k>=1} 1/(1 - y*x^k). - Andrew Howroyd, Jan 16 2025

Extensions

Terms a(21) and beyond from Andrew Howroyd, Mar 24 2021

A048887 Array T read by antidiagonals, where T(m,n) = number of compositions of n into parts <= m.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 4, 5, 1, 1, 2, 4, 7, 8, 1, 1, 2, 4, 8, 13, 13, 1, 1, 2, 4, 8, 15, 24, 21, 1, 1, 2, 4, 8, 16, 29, 44, 34, 1, 1, 2, 4, 8, 16, 31, 56, 81, 55, 1, 1, 2, 4, 8, 16, 32, 61, 108, 149, 89, 1, 1, 2, 4, 8, 16, 32, 63, 120, 208, 274, 144, 1
Offset: 1

Keywords

Comments

Taking finite differences of array columns from the top down, we obtain (1; 1,1; 1,2,1; 1,4,2,1; ...) = A048004 rows. - Gary W. Adamson, Aug 20 2010
T(m,n) is the number of binary words of length n-1 with < m consecutive 1's. - Geoffrey Critzer, Sep 02 2012

Examples

			T(2,5) counts 11111, 1112, 1121, 1211, 2111, 122, 212, 221, where "1211" abbreviates the composition 1+2+1+1.
These eight compositions correspond respectively to: {0,0,0,0}, {0,0,0,1}, {0,0,1,0}, {0,1,0,0}, {1,0,0,0}, {0,1,0,1}, {1,0,0,1}, {1,0,1,0} per the bijection given by _N. J. A. Sloane_ in A048004. - _Geoffrey Critzer_, Sep 02 2012
The array begins:
  1,  1,  1,  1,  1,  1,  1, ...
  1,  2,  3,  5,  8, 13, ...
  1,  2,  4,  7, 13, ...
  1,  2,  4,  8, ...
  1,  2,  4, ...
  1,  2, ...
  1, ...
		

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Princeton University Press, Princeton, NJ, 1978, p. 154.

Crossrefs

Rows: A000045 (Fibonacci), A000073 (tribonacci), A000078 (tetranacci), etc.
Essentially a reflected version of A092921. See A048004 and A126198 for closely related arrays.

Programs

  • Maple
    G := t->(1-z)/(1-2*z+z^(t+1)): T := (m,n)->coeff(series(G(m),z=0,30),z^n): matrix(7,12,T);
    # second Maple program:
    T:= proc(m, n) option remember; `if`(n=0 or m=1, 1,
          add(T(m, n-j), j=1..min(n, m)))
        end:
    seq(seq(T(1+d-n, n), n=1..d), d=1..14); # Alois P. Heinz, May 21 2013
  • Mathematica
    Table[nn=10;a=(1-x^k)/(1-x);b=1/(1-x);c=(1-x^(k-1))/(1-x); CoefficientList[ Series[a b/(1-x^2 b c), {x,0,nn}],x],{k,1,nn}]//Grid  (* Geoffrey Critzer, Sep 02 2012 *)
    T[m_, n_] := T[m, n] = If[n == 0 || m == 1, 1, Sum[T[m, n-j], {j, 1, Min[n, m]}]]; Table[Table[T[1+d-n, n], {n, 1, d}], {d, 1, 14}] // Flatten (* Jean-François Alcover, Nov 12 2014, after Alois P. Heinz *)

Formula

G.f.: (1-z)/[1-2z+z^(t+1)].

A325687 Triangle read by rows where T(n,k) is the number of length-k compositions of n such that every distinct consecutive subsequence has a different sum.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 0, 1, 1, 4, 4, 0, 1, 1, 5, 5, 0, 0, 1, 1, 6, 12, 4, 0, 0, 1, 1, 7, 12, 5, 0, 0, 0, 1, 1, 8, 25, 8, 4, 0, 0, 0, 1, 1, 9, 24, 12, 3, 0, 0, 0, 0, 1, 1, 10, 40, 32, 8, 4, 0, 0, 0, 0, 1, 1, 11, 41, 41, 6, 3, 0, 0, 0, 0, 0, 1
Offset: 1

Author

Gus Wiseman, May 13 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.

Examples

			The distinct consecutive subsequences of (1,1,3,3) are (1), (1,1), (3), (1,3), (1,1,3), (3,3), (1,3,3), (1,1,3,3), all of which have different sums, so (1,1,3,3) is counted under a(8).
Triangle begins:
  1
  1  1
  1  2  1
  1  3  0  1
  1  4  4  0  1
  1  5  5  0  0  1
  1  6 12  4  0  0  1
  1  7 12  5  0  0  0  1
  1  8 25  8  4  0  0  0  1
  1  9 24 12  3  0  0  0  0  1
  1 10 40 32  8  4  0  0  0  0  1
  1 11 41 41  6  3  0  0  0  0  0  1
  1 12 60 76 14  4  4  0  0  0  0  0  1
  1 13 60 88 16  6  3  0  0  0  0  0  0  1
Row n = 8 counts the following compositions:
  (8)  (17)  (116)  (1115)  (11111111)
       (26)  (125)  (1133)
       (35)  (143)  (2222)
       (44)  (152)  (3311)
       (53)  (215)  (5111)
       (62)  (233)
       (71)  (251)
             (332)
             (341)
             (512)
             (521)
             (611)
		

Crossrefs

Row sums are A325676.
Column k = 2 is A000027.
Column k = 3 is A325688.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n,{k}],UnsameQ@@Total/@Union[ReplaceList[#,{_,s__,_}:>{s}]]&]],{n,15},{k,n}]
Showing 1-10 of 25 results. Next