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

A226874 Number T(n,k) of n-length words w over a k-ary alphabet {a1, a2, ..., ak} such that #(w,a1) >= #(w,a2) >= ... >= #(w,ak) >= 1, where #(w,x) counts the letters x in word w; triangle T(n,k), n >= 0, 0 <= k <= n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 1, 3, 6, 0, 1, 10, 12, 24, 0, 1, 15, 50, 60, 120, 0, 1, 41, 180, 300, 360, 720, 0, 1, 63, 497, 1260, 2100, 2520, 5040, 0, 1, 162, 1484, 6496, 10080, 16800, 20160, 40320, 0, 1, 255, 5154, 20916, 58464, 90720, 151200, 181440, 362880
Offset: 0

Views

Author

Alois P. Heinz, Jun 21 2013

Keywords

Comments

T(n,k) is the sum of multinomials M(n; lambda), where lambda ranges over all partitions of n into parts that form a multiset of size k.

Examples

			T(4,2) = 10: aaab, aaba, aabb, abaa, abab, abba, baaa, baab, baba, bbaa.
T(4,3) = 12: aabc, aacb, abac, abca, acab, acba, baac, baca, bcaa, caab, caba, cbaa.
T(5,2) = 15: aaaab, aaaba, aaabb, aabaa, aabab, aabba, abaaa, abaab, ababa, abbaa, baaaa, baaab, baaba, babaa, bbaaa.
Triangle T(n,k) begins:
  1;
  0,  1;
  0,  1,   2;
  0,  1,   3,    6;
  0,  1,  10,   12,   24;
  0,  1,  15,   50,   60,   120;
  0,  1,  41,  180,  300,   360,   720;
  0,  1,  63,  497, 1260,  2100,  2520,  5040;
  0,  1, 162, 1484, 6496, 10080, 16800, 20160, 40320;
  ...
		

Crossrefs

Main diagonal gives: A000142.
Row sums give: A005651.
T(2n,n) gives A318796.

Programs

  • Maple
    b:= proc(n, i, t) option remember;
          `if`(t=1, 1/n!, add(b(n-j, j, t-1)/j!, j=i..n/t))
        end:
    T:= (n, k)-> `if`(n*k=0, `if`(n=k, 1, 0), n!*b(n, 1, k)):
    seq(seq(T(n, k), k=0..n), n=0..12);
    # second Maple program:
    b:= proc(n, i) option remember; expand(
          `if`(n=0, 1, `if`(i<1, 0, add(x^j*b(n-i*j, i-1)*
          combinat[multinomial](n, n-i*j, i$j), j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n$2)):
    seq(T(n), n=0..12);
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = If[t == 1, 1/n!, Sum[b[n - j, j, t - 1]/j!, {j, i, n/t}]]; t[n_, k_] := If[n*k == 0, If[n == k, 1, 0], n!*b[n, 1, k]]; Table[Table[t[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* Jean-François Alcover, Dec 13 2013, translated from first Maple *)
  • PARI
    T(n)={Vec(serlaplace(prod(k=1, n, 1/(1-y*x^k/k!) + O(x*x^n))))}
    {my(t=T(10)); for(n=1, #t, for(k=0, n-1, print1(polcoeff(t[n], k), ", ")); print)} \\ Andrew Howroyd, Dec 20 2017

Formula

T(n,k) = A226873(n,k) - [k>0] * A226873(n,k-1).

A285849 Number T(n,k) of permutations of [n] with k ordered cycles such that equal-sized cycles are ordered with increasing least elements; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 6, 1, 0, 6, 19, 18, 1, 0, 24, 100, 105, 40, 1, 0, 120, 508, 1005, 430, 75, 1, 0, 720, 3528, 6762, 6300, 1400, 126, 1, 0, 5040, 24876, 61572, 62601, 28700, 3822, 196, 1, 0, 40320, 219168, 558548, 706608, 431445, 105336, 9114, 288, 1
Offset: 0

Views

Author

Alois P. Heinz, Apr 27 2017

Keywords

Comments

Each cycle is written with the smallest element first and equal-sized cycles are arranged in increasing order of their first elements.

Examples

			T(3,1) = 2: (123), (132).
T(3,2) = 6: (1)(23), (23)(1), (2)(13), (13)(2), (3)(12), (12)(3).
T(3,3) = 1: (1)(2)(3).
Triangle T(n,k) begins:
  1;
  0,    1;
  0,    1,     1;
  0,    2,     6,     1;
  0,    6,    19,    18,     1;
  0,   24,   100,   105,    40,     1;
  0,  120,   508,  1005,   430,    75,    1;
  0,  720,  3528,  6762,  6300,  1400,  126,   1;
  0, 5040, 24876, 61572, 62601, 28700, 3822, 196, 1;
		

Crossrefs

Row sums give A196301.
Main diagonal and first lower diagonal give: A000012, A002411.
T(2n,n) gives A285862.

Programs

  • Maple
    b:= proc(n, i, p) option remember; expand(`if`(n=0 or i=1,
          (p+n)!/n!*x^n, add(b(n-i*j, i-1, p+j)*(i-1)!^j*combinat
          [multinomial](n, n-i*j, i$j)/j!^2*x^j, j=0..n/i)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n$2, 0)):
    seq(T(n), n=0..12);
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!);
    b[n_, i_, p_] := b[n, i, p] = Expand[If[n == 0 || i == 1, (p + n)!/n!*x^n, Sum[b[n - i*j, i - 1, p + j]*(i - 1)!^j*multinomial[n, Join[{n - i*j}, Table[i, j]]]/j!^2*x^j, {j, 0, n/i}]]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, n}]][b[n, n, 0]];
    Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Apr 28 2018, after Alois P. Heinz *)

A120774 Number of ordered set partitions of [n] where equal-sized blocks are ordered with increasing least elements.

Original entry on oeis.org

1, 1, 2, 8, 31, 147, 899, 5777, 41024, 322488, 2749325, 25118777, 245389896, 2554780438, 28009868787, 323746545433, 3933023224691, 49924332801387, 661988844566017, 9138403573970063, 131043199040556235, 1949750421507432009, 30031656711776544610
Offset: 0

Views

Author

Alford Arnold, Jul 12 2006

Keywords

Comments

Old name was: Row sums of A179233.
a(n) is the number of ways to linearly order the blocks in each set partition of {1,2,...,n} where two blocks are considered identical if they have the same number of elements. - Geoffrey Critzer, Sep 29 2011

Examples

			A179233 begins 1; 1; 1 1; 6 1 1; 8 3 18 1 1 ... with row sums 1, 1 2 8 31 147 ...
a(3) = 8: 123, 1|23, 23|1, 2|13, 13|2, 3|12, 12|3, 1|2|3. - _Alois P. Heinz_, Apr 27 2017
		

Crossrefs

Row sums of A179233, A285824.
Main diagonal of A327244.

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0 or i=1,
          (p+n)!/n!, add(b(n-i*j, i-1, p+j)*combinat
          [multinomial](n, n-i*j, i$j)/j!^2, j=0..n/i))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..25);  # Alois P. Heinz, Apr 27 2017
  • Mathematica
    f[{x_,y_}]:= x!^y y!;   Table[Total[Table[n!,{PartitionsP[n]}]/Apply[Times,Map[f,Map[Tally,Partitions[n]],{2}],2] * Apply[Multinomial,Map[Last,Map[Tally,Partitions[n]],{2}],2]],{n,0,20}]  (* Geoffrey Critzer, Sep 29 2011 *)

Extensions

Leading 1 inserted, definition simplified by R. J. Mathar, Sep 28 2011
a(15) corrected, more terms, and new name (using Geoffrey Critzer's comment) from Alois P. Heinz, Apr 27 2017

A285917 Number of ordered set partitions of [n] into two blocks such that equal-sized blocks are ordered with increasing least elements.

Original entry on oeis.org

1, 6, 11, 30, 52, 126, 219, 510, 896, 2046, 3632, 8190, 14666, 32766, 59099, 131070, 237832, 524286, 956196, 2097150, 3841586, 8388606, 15425136, 33554430, 61908562, 134217726, 248377154, 536870910, 996183062, 2147483646, 3994427099, 8589934590, 16013066072
Offset: 2

Views

Author

Alois P. Heinz, Apr 28 2017

Keywords

Comments

a(n) is odd if and only if n = 2^k with k>0.

Crossrefs

Column k=2 of A285824.
Cf. A285853.

Programs

  • Maple
    a:= n-> 2*add(binomial(n, k), k=1..n/2)-
            `if`(n::even, 3/2*binomial(n, n/2), 0):
    seq(a(n), n=2..40);
    # second Maple program:
    a:= proc(n) option remember; `if`(n<5, [0, 1, 6, 11][n],
          (9*(n-1)*(n-4)*a(n-1)+2*(3*n^2-16*n+6)*a(n-2)
          -36*(n-2)*(n-4)*a(n-3)+8*(n-3)*(3*n-10)*a(n-4))
          /((3*n-13)*n))
        end:
    seq(a(n), n=2..40);
  • Mathematica
    a[n_] := 2*Sum[Binomial[n, k], {k, 1, n/2}] - If[EvenQ[n], 3/2*Binomial[n, n/2], 0];
    Table[a[n], {n, 2, 40}] (* Jean-François Alcover, May 26 2018, from Maple *)
  • PARI
    a(n) = 2*sum(k=1, n\2, binomial(n, k)) - if (!(n%2), 3*binomial(n, n/2)/2); \\ Michel Marcus, May 26 2018

A285918 Number of ordered set partitions of [n] into three blocks such that equal-sized blocks are ordered with increasing least elements.

Original entry on oeis.org

1, 18, 75, 420, 1218, 4242, 14563, 42930, 132528, 432960, 1250340, 3814629, 12073701, 35074482, 106044555, 331913202, 967193328, 2917846758, 9062084298, 26507831559, 79848170823, 246771097680, 723922691700, 2178960263415, 6709005218503, 19728686792637
Offset: 3

Views

Author

Alois P. Heinz, Apr 28 2017

Keywords

Crossrefs

Column k=3 of A285824.
Cf. A285854.

Programs

  • Maple
    b:= proc(n, i, p) option remember; series(`if`(n=0 or i=1,
          (p+n)!/n!*x^n, add(x^j*b(n-i*j, i-1, p+j)*combinat
          [multinomial](n, n-i*j, i$j)/j!^2, j=0..n/i)), x, 4)
        end:
    a:= n-> coeff(b(n$2, 0), x, 3):
    seq(a(n), n=3..30);
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!);
    b[n_, i_, p_] := b[n, i, p] = Series[If[n == 0 || i == 1, (p + n)!/n!*x^n, Sum[x^j*b[n - i*j, i-1, p+j]*multinomial[n, Join[{n - i*j}, Table[i, j] ] ]/j!^2, {j, 0, n/i}]], {x, 0, 4}];
    a[n_] := Coefficient[b[n, n, 0], x, 3];
    Table[a[n], {n, 3, 30}] (* Jean-François Alcover, May 17 2018, translated from Maple *)

A285919 Number of ordered set partitions of [n] into four blocks such that equal-sized blocks are ordered with increasing least elements.

Original entry on oeis.org

1, 40, 350, 3080, 17129, 82488, 464650, 1901680, 8357426, 35701952, 159721016, 627687060, 2642405289, 10712590392, 45568675202, 178738923440, 736145997686, 2946913512648, 12311241803256, 48275516469180, 197284995875314, 786939537437440, 3254422571085400
Offset: 4

Views

Author

Alois P. Heinz, Apr 28 2017

Keywords

Crossrefs

Column k=4 of A285824.
Cf. A285855.

Programs

  • Maple
    b:= proc(n, i, p) option remember; series(`if`(n=0 or i=1,
          (p+n)!/n!*x^n, add(x^j*b(n-i*j, i-1, p+j)*combinat
          [multinomial](n, n-i*j, i$j)/j!^2, j=0..n/i)), x, 5)
        end:
    a:= n-> coeff(b(n$2, 0), x, 4):
    seq(a(n), n=4..30);
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!);
    b[n_, i_, p_] := b[n, i, p] = Series[If[n == 0 || i == 1, (p + n)!/n!*x^n, Sum[x^j*b[n - i*j, i - 1, p + j]*multinomial[n, Join[{n - i*j}, Table[i, j]]]/j!^2, {j, 0, n/i}]], {x, 0, 5}];
    a[n_] := Coefficient[b[n, n, 0], x, 4];
    Table[a[n], {n, 4, 30}] (* Jean-François Alcover, May 17 2018, translated from Maple *)

A285920 Number of ordered set partitions of [n] into five blocks such that equal-sized blocks are ordered with increasing least elements.

Original entry on oeis.org

1, 75, 1225, 15750, 152355, 1049895, 8130925, 51541050, 305751160, 1721589870, 10370592050, 54481859250, 292852136335, 1539187989915, 8149972381105, 43456591157700, 220640087499230, 1133640238666320, 5822084961637780, 29811110400741780, 154396823960132126
Offset: 5

Views

Author

Alois P. Heinz, Apr 28 2017

Keywords

Crossrefs

Column k=5 of A285824.
Cf. A285856.

Programs

  • Maple
    b:= proc(n, i, p) option remember; series(`if`(n=0 or i=1,
          (p+n)!/n!*x^n, add(x^j*b(n-i*j, i-1, p+j)*combinat
          [multinomial](n, n-i*j, i$j)/j!^2, j=0..n/i)), x, 6)
        end:
    a:= n-> coeff(b(n$2, 0), x, 5):
    seq(a(n), n=5..30);
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!);
    b[n_, i_, p_] := b[n, i, p] = Series[If[n == 0 || i == 1, (p + n)!/n!*x^n, Sum[x^j*b[n - i*j, i - 1, p + j]*multinomial[n, Join[{n - i*j}, Table[i, j]]]/j!^2, {j, 0, n/i}]], {x, 0, 6}];
    a[n_] := Coefficient[b[n, n, 0], x, 5];
    Table[a[n], {n, 5, 30}] (* Jean-François Alcover, May 17 2018, translated from Maple *)

A285921 Number of ordered set partitions of [n] into six blocks such that equal-sized blocks are ordered with increasing least elements.

Original entry on oeis.org

1, 126, 3486, 63756, 954387, 9628542, 97141022, 886634892, 7048863822, 53483658228, 397751490318, 2858731936788, 19510233553063, 130084038669798, 844004265958794, 5657554841332464, 35647504639822614, 227439073802247384, 1425548351910315534, 8934412155886521480
Offset: 6

Views

Author

Alois P. Heinz, Apr 28 2017

Keywords

Crossrefs

Column k=6 of A285824.
Cf. A285857.

Programs

  • Maple
    b:= proc(n, i, p) option remember; series(`if`(n=0 or i=1,
          (p+n)!/n!*x^n, add(x^j*b(n-i*j, i-1, p+j)*combinat
          [multinomial](n, n-i*j, i$j)/j!^2, j=0..n/i)), x, 7)
        end:
    a:= n-> coeff(b(n$2, 0), x, 6):
    seq(a(n), n=6..30);
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!);
    b[n_, i_, p_] := b[n, i, p] = Series[If[n == 0 || i == 1, (p + n)!/n!*x^n, Sum[x^j*b[n - i*j, i - 1, p + j]*multinomial[n, Join[{n - i*j}, Table[i, j]]]/j!^2, {j, 0, n/i}]], {x, 0, 7}];
    a[n_] := Coefficient[b[n, n, 0], x, 6];
    Table[a[n], {n, 6, 30}] (* Jean-François Alcover, May 17 2018, translated from Maple *)

A285922 Number of ordered set partitions of [n] into seven blocks such that equal-sized blocks are ordered with increasing least elements.

Original entry on oeis.org

1, 196, 8526, 217560, 4635939, 67454772, 877414538, 10742461730, 113528563148, 1132899916148, 10494458555126, 96114856972680, 831333224017303, 7005224782844764, 56197005110455286, 453234116137501160, 3555422918860518398, 27541742188014185824
Offset: 7

Views

Author

Alois P. Heinz, Apr 28 2017

Keywords

Crossrefs

Column k=7 of A285824.
Cf. A285858.

Programs

  • Maple
    b:= proc(n, i, p) option remember; series(`if`(n=0 or i=1,
          (p+n)!/n!*x^n, add(x^j*b(n-i*j, i-1, p+j)*combinat
          [multinomial](n, n-i*j, i$j)/j!^2, j=0..n/i)), x, 8)
        end:
    a:= n-> coeff(b(n$2, 0), x, 7):
    seq(a(n), n=7..30);
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!);
    b[n_, i_, p_] := b[n, i, p] = Series[If[n == 0 || i == 1, (p + n)!/n!*x^n, Sum[x^j*b[n - i*j, i - 1, p + j]*multinomial[n, Join[{n - i*j}, Table[i, j]]]/j!^2, {j, 0, n/i}]], {x, 0, 8}] ;
    a[n_] := Coefficient[b[n, n, 0], x, 7];
    Table[a[n], {n, 7, 30}] (* Jean-François Alcover, May 17 2018, translated from Maple *)

A285923 Number of ordered set partitions of [n] into eight blocks such that equal-sized blocks are ordered with increasing least elements.

Original entry on oeis.org

1, 288, 18600, 649440, 18650346, 378728064, 6346968056, 99768480240, 1370094506209, 17452476893280, 204026690329800, 2291047776886752, 24663963563727574, 256637317406331648, 2540192740448641960, 24558666993552144288, 233835181800425532162
Offset: 8

Views

Author

Alois P. Heinz, Apr 28 2017

Keywords

Crossrefs

Column k=8 of A285824.
Cf. A285859.

Programs

  • Maple
    b:= proc(n, i, p) option remember; series(`if`(n=0 or i=1,
          (p+n)!/n!*x^n, add(x^j*b(n-i*j, i-1, p+j)*combinat
          [multinomial](n, n-i*j, i$j)/j!^2, j=0..n/i)), x, 9)
        end:
    a:= n-> coeff(b(n$2, 0), x, 8):
    seq(a(n), n=8..30);
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!);
    b[n_, i_, p_] := b[n, i, p] = Series[If[n == 0 || i == 1, (p + n)!/n!*x^n, Sum[x^j*b[n - i*j, i - 1, p + j]*multinomial[n, Join[{n - i*j}, Table[i, j]]]/j!^2, {j, 0, n/i}]], {x, 0, 9}];
    a[n_] := Coefficient[b[n, n, 0], x, 8];
    Table[a[n], {n, 8, 30}] (* Jean-François Alcover, May 17 2018, translated from Maple *)
Showing 1-10 of 13 results. Next