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.

A241500 Triangle T(n,k): number of ways of partitioning the n-element multiset {1,1,2,3,...,n-1} into exactly k nonempty parts, n>=1 and 1<=k<=n.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 5, 4, 1, 1, 11, 16, 7, 1, 1, 23, 58, 41, 11, 1, 1, 47, 196, 215, 90, 16, 1, 1, 95, 634, 1041, 640, 176, 22, 1, 1, 191, 1996, 4767, 4151, 1631, 315, 29, 1, 1, 383, 6178, 21001, 25221, 13587, 3696, 526, 37, 1, 1, 767, 18916, 90055, 146140, 105042, 38409, 7638, 831, 46, 1
Offset: 1

Views

Author

Andrew Woods, Apr 24 2014

Keywords

Examples

			There are 58 ways to partition {1,1,2,3,4,5} into three nonempty parts.
The first few rows are:
  1;
  1,   1;
  1,   2,    1;
  1,   5,    4,     1;
  1,  11,   16,     7,     1;
  1,  23,   58,    41,    11,     1;
  1,  47,  196,   215,    90,    16,    1;
  1,  95,  634,  1041,   640,   176,   22,   1;
  1, 191, 1996,  4767,  4151,  1631,  315,  29,  1;
  1, 383, 6178, 21001, 25221, 13587, 3696, 526, 37, 1;
  ...
		

Crossrefs

The first five columns appear as A000012, A083329, A168583, A168584, A168585.
Row sums give A035098.

Programs

  • PARI
    T(n,k) = stirling(n-1,k,2) + stirling(n-1,k-1,2) + binomial(k,2)*stirling(n-2,k,2); \\ Michel Marcus, Apr 24 2014

Formula

T(n,k) = S(n-1,k) + S(n-1,k-1) + C(k,2)*S(n-2,k), where S refers to Stirling numbers of the second kind (A008277), and C to binomial coefficients (A007318).

A168584 Number of ways of partitioning the multiset {1,1,2,3,...,n-1} into exactly four nonempty parts.

Original entry on oeis.org

1, 7, 41, 215, 1041, 4767, 21001, 90055, 378881, 1572527, 6463161, 26375895, 107081521, 433076287, 1746588521, 7029269735, 28245956961, 113370724047, 454644109081, 1822061123575, 7298700653201, 29226175283807
Offset: 4

Views

Author

Martin Griffiths, Nov 30 2009

Keywords

Comments

The number of ways of partitioning the multiset {1, 1, 2, 3, ..., n-1} into exactly two, three and five nonempty parts are given in A083329, A168583 and A168585, respectively.

Crossrefs

Programs

  • Magma
    [(5*4^(n-3)-3^(n-1)+3*2^(n-2)-2)/3: n in [4..30]]; // Wesley Ivan Hurt, Dec 12 2015
  • Maple
    A168584:=n->(5*4^(n-3)-3^(n-1)+3*2^(n-2)-2)/3: seq(A168584(n), n=4..30); # Wesley Ivan Hurt, Dec 12 2015
  • Mathematica
    f2[n_] := 1/3 (5 4^(n - 3) - 3^(n - 1) + 3 2^(n - 2) - 2); Table[f2[n], {n, 4, 25}]
    LinearRecurrence[{10,-35,50,-24},{1,7,41,215},30] (* Harvey P. Dale, Sep 15 2020 *)

Formula

For a>=4, a(n) = (5*4^(n-3) - 3^(n-1) + 3*2^(n-2) - 2)/3.
The shifted exponential generating function is (20e^(4x) - 27e^(3x) + 12e^(2x) - 2e^x)/3.
The ordinary generating function is x^4(1-3x+6x^2)/((1-x)(1-2x)(1-3x)(1-4x)).

A168585 Number of ways of partitioning the multiset {1,1,2,3,...,n-1} into exactly five nonempty parts.

Original entry on oeis.org

1, 11, 90, 640, 4151, 25221, 146140, 817730, 4458201, 23835031, 125551790, 653873220, 3375658651, 17308994441, 88284419040, 448429907110, 2270331053501, 11464832543451, 57778226219890, 290711449879400
Offset: 5

Views

Author

Martin Griffiths, Nov 30 2009

Keywords

Crossrefs

The number of ways of partitioning the multiset {1, 1, 2, 3, ..., n-1} into exactly two, three and four nonempty parts are given in A083329, A168583 and A168584, respectively.

Programs

  • Mathematica
    f3[n_] := 1/24 (3 5^(n - 2) - 10 4^(n - 2) + 14 3^(n - 2) - 3 2^(n) + 7); Table[f3[n], {n, 3, 25}]

Formula

For a>=5, a(n) = (3*5^(n-2) - 10*4^(n-2) + 14*3^(n-2) - 3*2^(n) + 7)/24.
The shifted exponential generating function is (375e^(5x) - 640e^(4x) + 378e^(3x) - 96e^(2x) + 7e^x)/24.
The ordinary generating function is x^5(1-4x+10x^2)/((1-x)(1-2x)(1-3x)(1-4x)(1-5x)).

A158198 Triangle T(n, k) = Sum_{j=0..k-1} (-1)^j*binomial(k, j+1)*(k-j)^(n-k), read by rows.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 7, 4, 1, 1, 15, 16, 5, 1, 1, 31, 58, 25, 6, 1, 1, 63, 196, 125, 36, 7, 1, 1, 127, 634, 601, 216, 49, 8, 1, 1, 255, 1996, 2765, 1296, 343, 64, 9, 1, 1, 511, 6178, 12265, 7656, 2401, 512, 81, 10, 1, 1, 1023, 18916, 52925, 44136, 16807, 4096, 729, 100, 11, 1
Offset: 1

Views

Author

Thomas J Engelsma (tom(AT)opertech.com), Mar 13 2009

Keywords

Examples

			Triangle begins
  1;
  1,   1;
  1,   3,    1;
  1,   7,    4,    1;
  1,  15,   16,    5,    1;
  1,  31,   58,   25,    6,   1;
  1,  63,  196,  125,   36,   7,  1;
  1, 127,  634,  601,  216,  49,  8, 1;
  1, 255, 1996, 2765, 1296, 343, 64, 9, 1;
a(8,4) = 1*4*4^4 - 1*6*3^4 + 1*4*2^4 - 1*1*1^4 = 1024 - 486 + 64 - 1 = 601.
		

Crossrefs

Column 2 is A000225, column 3 is A168583. - Michel Marcus, Jun 19 2013

Programs

  • Magma
    [(&+[(-1)^j*Binomial(k, j+1)*(k-j)^(n-k): j in [0..k-1]]): k in [1..n], n in [1..12]]; // G. C. Greubel, Jun 26 2021
    
  • Mathematica
    Table[Sum[(-1)^j*Binomial[k, j+1]*(k-j)^(n-k), {j, 0, k-1}], {n, 12}, {k, n}]//Flatten (* G. C. Greubel, Jun 26 2021 *)_
  • PARI
    tabl(nn) = {for (n=1, nn, for (k=1, n, print1(sum(i=0, k-1, (-1)^i*binomial(k,i+1)*(k-i)^(n-k)), ", ");); print(););} \\ Michel Marcus, Jun 19 2013
    
  • Sage
    flatten([[ sum( (-1)^j*binomial(k, j+1)*(k-j)^(n-k) for j in (0..k-1)) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Jun 26 2021

Formula

T(n, k) = Sum_{j=0..k-1} (-1)^j*binomial(k, j+1)*(k-j)^(n-k).
Showing 1-4 of 4 results.