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

A172106 The triangle T_2(n, m), where T_2(n, m) is the number of surjective multi-valued functions from {1, 1, 2, 3, ..., n-1} to {1, 2, 3, ..., m} by rows (n >= 1, 1 <= m <= n).

Original entry on oeis.org

0, 1, 1, 1, 4, 3, 1, 10, 21, 12, 1, 22, 93, 132, 60, 1, 46, 345, 900, 960, 360, 1, 94, 1173, 4980, 9300, 7920, 2520, 1, 190, 3801, 24612, 71400, 103320, 73080, 20160, 1, 382, 11973, 113652, 480060, 1048320, 1234800, 745920, 181440, 1, 766, 37065, 502500, 2968560, 9170280, 15981840, 15845760, 8346240, 1814400
Offset: 1

Views

Author

Martin Griffiths, Jan 25 2010

Keywords

Comments

T_2(1, m) = 0 by definition. T_2(n, m) also gives the number of compositions (ordered partitions) of {1, 1, 2, 3, ..., n-1} into exactly m parts.

Examples

			Triangle begins as:
  0;
  1,   1;
  1,   4,     3;
  1,  10,    21,     12;
  1,  22,    93,    132,      60;
  1,  46,   345,    900,     960,     360;
  1,  94,  1173,   4980,    9300,    7920,     2520;
  1, 190,  3801,  24612,   71400,  103320,    73080,    20160;
  1, 382, 11973, 113652,  480060, 1048320,  1234800,   745920,  181440;
  1, 766, 37065, 502500, 2968560, 9170280, 15981840, 15845760, 8346240, 1814400;
  ...
T_2(3, 2) = 4 since there are 4 ordered partitions of {1, 1, 2} into exactly 2 parts: (1) {{1}, {1, 2}} (2) {{1, 2}, {1}} (3) {{2}, {1, 1}} (4) {{1, 1},{2}}.
		

Crossrefs

This is related to A019538, A172107 and A172108.
Row sums give A172109.

Programs

  • Magma
    T:= func< n,k,m | n eq 1 select 0 else (&+[(-1)^(k+j)*Binomial(k,j)*Binomial(j+m-1,m)*j^(n-m): j in [1..k]]) >;
    [T(n,k,2): k in [1..n], n in [1..12]]; // G. C. Greubel, Apr 13 2022
    
  • Mathematica
    f[r_, n_, m_]:= Sum[Binomial[m, l] Binomial[l+r-1, r] (-1)^(m-l) l^(n-r), {l,m}]; For[n = 2, n <= 10, n++, Print[Table[f[2, n, m], {m, 1, n}]]]
  • SageMath
    def T(n,k,m): return sum( (-1)^(k-j)*binomial(k,j)*binomial(j+m-1,m)*j^(n-m) for j in (1..k) ) - bool(n==1)
    flatten([[T(n,k,2) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Apr 13 2022

Formula

T_2(n, m) = Sum_{j=0..m} binomial(m,j)*binomial(j+1,2)*(-1)^(m-j)*j^(n-2), for n >= 2, with T(1, 1) = 0.
Sum_{k=1..n} T_2(n, k) = A172109(n).
Sum_{k=1..n} (-1)^k*T_2(n, k) = 0. - G. C. Greubel, Apr 13 2022

A172108 Triangle T_4(n, m), the number of surjective multi-valued functions from {1, 1, 1, 1, 2, 3, ..., n-3} to {1, 2, 3, ..., m} by rows (n >= 1, 1 <= m <= n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 3, 3, 1, 1, 8, 18, 16, 5, 1, 18, 78, 136, 105, 30, 1, 38, 288, 856, 1205, 810, 210, 1, 78, 978, 4576, 10305, 12090, 7140, 1680, 1, 158, 3168, 22216, 74405, 134370, 134610, 70560, 15120, 1, 318, 9978, 101536, 483105, 1252650, 1882860, 1641360, 771120, 151200
Offset: 1

Views

Author

Martin Griffiths, Jan 25 2010

Keywords

Comments

T_4(1, m) = T_4(2, m) = T_4(3, m) = 0 by definition. T_4(n, m) also gives the number of ordered partitions of {1, 1, 1, 1, 2, 3, ..., n-3} into exactly m parts.

Examples

			Triangle begins as:
  0;
  0,   0;
  0,   0,    0;
  1,   3,    3,      1;
  1,   8,   18,     16,      5;
  1,  18,   78,    136,    105,      30;
  1,  38,  288,    856,   1205,     810,     210;
  1,  78,  978,   4576,  10305,   12090,    7140,    1680;
  1, 158, 3168,  22216,  74405,  134370,  134610,   70560,  15120;
  1, 318, 9978, 101536, 483105, 1252650, 1882860, 1641360, 771120, 151200;
		

Crossrefs

This is related to A019538, A172106 and A172107.
Row sums give A172111.

Programs

  • Magma
    T:= func< n,k,m | n lt 4 select 0 else (&+[(-1)^(k+j)*Binomial(k,j)*Binomial(j+m-1,m)*j^(n-m): j in [1..k]]) >;
    [T(n,k,4): k in [1..n], n in [1..12]]; // G. C. Greubel, Apr 14 2022
    
  • Mathematica
    f[r_, n_, m_]:= Sum[Binomial[m, l] Binomial[l+r-1, r] (-1)^(m-l) l^(n-r), {l,m}]; For[n = 4, n <= 10, n++, Print[Table[f[4, n, m], {m, 1, n}]]]
  • SageMath
    def T(n,k,m):
        if (n<4): return 0
        else: return sum( (-1)^(k-j)*binomial(k,j)*binomial(j+m-1,m)*j^(n-m) for j in (1..k) )
    flatten([[T(n,k,4) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Apr 14 2022

Formula

T_4(n, m) = Sum_{j=0..m} binomial(m,j)*binomial(j+3,4)*(-1)^(m-j)*j^(n-4), for n >= 4, with T(n, k) = 0 for n < 4.
Sum_{k=1.n} T_4(n, k) = A172111(n).
Sum_{k=1..n} (-1)^k*T_4(n, k) = 0. - G. C. Greubel, Apr 14 2022

A172110 a(n) is the number of ordered partitions of {1, 1, 1, 2, 3, ..., n-2}.

Original entry on oeis.org

0, 0, 4, 20, 132, 1076, 10404, 116180, 1469892, 20766836, 323924964, 5527326740, 102396386052, 2046350191796, 43876822764324, 1004631156809300, 24463049576172612, 631213045618035956, 17203155473859536484
Offset: 1

Views

Author

Martin Griffiths, Jan 25 2010

Keywords

Crossrefs

Row sums of A172107.

Programs

  • Magma
    [0,0] cat [(&+[ (&+[Binomial(k,j)*Binomial(j+2,3)*(-1)^(k-j)*j^(n-3): j in [0..k]]): k in [1..n]]): n in [3..25]]; // G. C. Greubel, Apr 15 2022
    
  • Mathematica
    f[r_, n_]:= f[r, n]= If[n<3, 0, Sum[Sum[Binomial[m, l]Binomial[l+r-1, r] (-1)^(m-l) l^(n-r), {l, m}], {m, n}]]; Table[f[3, n], {n, 25}]
  • Sage
    [0,0]+[sum(sum(binomial(k,j)*binomial(j+2,3)*(-1)^(k+j)*j^(n-3) for j in (0..k)) for k in (1..n)) for n in (3..25)] # G. C. Greubel, Apr 15 2022

Formula

T_3(n) = Sum_{m=1..n} Sum_{j=0..m} binomial(m,j)*binomial(j+2,3)*(-1)^(m-j)*j^(n-3) for n > 2 with T_3(1) = T_3(2) = 0.
a(n) ~ n! / (12 * log(2)^(n+1)). - Vaclav Kotesovec, Apr 15 2022
Showing 1-3 of 3 results.