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

A032011 Partition n labeled elements into sets of different sizes and order the sets.

Original entry on oeis.org

1, 1, 1, 7, 9, 31, 403, 757, 2873, 12607, 333051, 761377, 3699435, 16383121, 108710085, 4855474267, 13594184793, 76375572751, 388660153867, 2504206435681, 20148774553859, 1556349601444477, 5050276538344665, 33326552998257031, 186169293932977115, 1305062351972825281, 9600936552132048553, 106019265737746665727, 12708226588208611056333, 47376365554715905155127
Offset: 0

Views

Author

Christian G. Bower, Apr 01 1998

Keywords

Comments

From Alois P. Heinz, Sep 02 2015: (Start)
Also the number of matrices with n rows of nonnegative integer entries and without zero rows or columns such that the sum of all entries is equal to n and the column sums are distinct. Equivalently, the number of compositions of n into distinct parts where each part i is marked with a word of length i over an n-ary alphabet whose letters appear in alphabetical order and all n letters occur exactly once.
a(3) = 7:
[1] [1 0] [0 1] [1 0] [0 1] [0 1] [1 0]
[1] [1 0] [0 1] [0 1] [1 0] [1 0] [0 1]
[1] [0 1] [1 0] [1 0] [0 1] [1 0] [0 1].
3abc, 2ab1c, 1c2ab, 2ac1b, 1b2ac, 2bc1a, 1a2bc. (End)

Crossrefs

Main diagonal of A261836 and A261959.

Programs

  • Maple
    b:= proc(n, i, p) option remember;
          `if`(i*(i+1)/2n, 0, b(n-i, i-1, p+1)*binomial(n,i))))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..30);  # Alois P. Heinz, Sep 02 2015
  • Mathematica
    f[list_]:=Apply[Multinomial,list]*Length[list]!; Table[Total[Map[f, Select[IntegerPartitions[n], Sort[#] == Union[#] &]]], {n, 1, 30}]
    b[n_, i_, p_] := b[n, i, p] = If[i*(i+1)/2n, 0, b[n-i, i-1, p+1]*Binomial[n, i]]]]; a[n_] := b[n, n, 0]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Nov 16 2015, after Alois P. Heinz *)
  • PARI
    seq(n)=[subst(serlaplace(y^0*p),y,1) | p <- Vec(serlaplace(prod(k=1, n, 1 + x^k*y/k! + O(x*x^n))))] \\ Andrew Howroyd, Sep 13 2018

Formula

"AGJ" (ordered, elements, labeled) transform of 1, 1, 1, 1, ...
a(n) = Sum_{k>=0} k! * A131632(n,k). - Alois P. Heinz, Sep 09 2015

Extensions

a(0)=1 prepended by Alois P. Heinz, Sep 02 2015

A285824 Number T(n,k) of ordered set partitions of [n] into k blocks such that equal-sized blocks 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, 1, 6, 1, 0, 1, 11, 18, 1, 0, 1, 30, 75, 40, 1, 0, 1, 52, 420, 350, 75, 1, 0, 1, 126, 1218, 3080, 1225, 126, 1, 0, 1, 219, 4242, 17129, 15750, 3486, 196, 1, 0, 1, 510, 14563, 82488, 152355, 63756, 8526, 288, 1, 0, 1, 896, 42930, 464650, 1049895, 954387, 217560, 18600, 405, 1
Offset: 0

Views

Author

Alois P. Heinz, Apr 27 2017

Keywords

Examples

			T(3,1) = 1: 123.
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, 1,   6,    1;
  0, 1,  11,   18,     1;
  0, 1,  30,   75,    40,     1;
  0, 1,  52,  420,   350,    75,    1;
  0, 1, 126, 1218,  3080,  1225,  126,   1;
  0, 1, 219, 4242, 17129, 15750, 3486, 196, 1;
  ...
		

Crossrefs

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

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)*x^j*combinat
          [multinomial](n, n-i*j, i$j)/j!^2, 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]*x^j*multinomial[n, Join[{n-i*j}, Table[i, j]]]/ j!^2, {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 *)

A327244 Number T(n,k) of colored compositions of n using all colors of a k-set such that all parts have different color patterns and the patterns for parts i are sorted and have i colors in (weakly) increasing order; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 3, 10, 8, 0, 3, 27, 54, 31, 0, 5, 70, 255, 336, 147, 0, 11, 223, 1222, 2692, 2580, 899, 0, 13, 508, 4467, 15512, 25330, 19566, 5777, 0, 19, 1193, 15540, 78819, 194075, 248976, 160377, 41024, 0, 27, 2822, 52981, 375440, 1303250, 2463534, 2593339, 1430288, 322488
Offset: 0

Views

Author

Alois P. Heinz, Sep 14 2019

Keywords

Examples

			T(3,1) = 3: 3aaa, 2aa1a, 1a2aa.
T(3,2) = 10: 3aab, 3abb, 2aa1b, 2ab1a, 2ab1b, 2bb1a, 1a2ab, 1a2bb, 1b2aa, 1b2ab.
T(3,3) = 8: 3abc, 2ab1c, 2ac1b, 2bc1a, 1a2bc, 1b2ac, 1c2ab, 1a1b1c.
Triangle T(n,k) begins:
  1;
  0,  1;
  0,  1,    2;
  0,  3,   10,     8;
  0,  3,   27,    54,    31;
  0,  5,   70,   255,   336,    147;
  0, 11,  223,  1222,  2692,   2580,    899;
  0, 13,  508,  4467, 15512,  25330,  19566,   5777;
  0, 19, 1193, 15540, 78819, 194075, 248976, 160377, 41024;
  ...
		

Crossrefs

Columns k=0-2 give: A000007, A032020 (for n>0), A327841.
Main diagonal gives A120774.
Row sums give A309670.
T(2n,n) gives A327596.

Programs

  • Maple
    C:= binomial:
    b:= proc(n, i, k, p) option remember; `if`(n=0, p!, `if`(i<1, 0, add(
          b(n-i*j, min(n-i*j, i-1), k, p+j)/j!*C(C(k+i-1,i),j), j=0..n/i)))
        end:
    T:= (n, k)-> add(b(n$2, i, 0)*(-1)^(k-i)*C(k, i), i=0..k):
    seq(seq(T(n, k), k=0..n), n=0..10);
  • Mathematica
    c = Binomial;
    b[n_, i_, k_, p_] := b[n, i, k, p] = If[n == 0, p!, If[i < 1, 0, Sum[b[n - i*j, Min[n - i*j, i-1], k, p+j]/j!*c[c[k + i - 1, i], j], {j, 0, n/i}]]];
    T[n_, k_] := Sum[b[n, n, i, 0]*(-1)^(k-i)*c[k, i], {i, 0, k}];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Apr 28 2020, after Alois P. Heinz *)

Formula

Sum_{k=1..n} k * T(n,k) = A327595(n).

A196301 The number of ways to linearly order the cycles in each permutation of {1,2,...,n} where two cycles are considered identical if they have the same length.

Original entry on oeis.org

1, 1, 2, 9, 44, 270, 2139, 18837, 186808, 2070828, 25861140, 350000640, 5145279611, 81492295079, 1381583542234, 25097285838765, 484602684624080, 9894705390149400, 213418984780492164, 4842425874827849868, 115231446547162291200, 2874808892527026177240
Offset: 0

Views

Author

Geoffrey Critzer, Sep 30 2011

Keywords

Examples

			a(4) = 44 because in the conjugacy classes of S(4): (4), (3)(1), (2)(2), (2)(1)(1), (1)(1)(1)(1) there are (respectively) 6 permutations times 1 arrangement, 8 permutations times 2 arrangements, 3 permutations times 1 arrangement, 6 permutations times 3 arrangements, and 1 permutation times 1 arrangement.  So 6*1+8*2+3*1+6*3+1*1 = 44.
		

Crossrefs

Cf. A120774.
Row sums of A285849.

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)*(i-1)!^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
    Needs["Combinatorica`"]; 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}]

A179233 Irregular triangle T(n,k) = A049019(n,k)/A096162(n,k) read along rows, 1<=k <= A000041(n).

Original entry on oeis.org

1, 1, 1, 1, 6, 1, 1, 8, 3, 18, 1, 1, 10, 20, 30, 45, 40, 1, 1, 12, 30, 10, 45, 360, 15, 80, 270, 75, 1, 1, 14, 42, 70, 63, 630, 210, 315, 140, 2520, 420, 175, 1050, 126, 1, 1, 16, 56, 112, 35, 84, 1008, 1680, 630, 840, 224, 5040, 1680
Offset: 1

Views

Author

Alford Arnold, Jul 08 2010

Keywords

Comments

Each row n of A049019, of A096162 and of the triangle here has A000041(n) entries.

Examples

			A049019(.,.) begins 1; 1; 2, 1; 6, 6, 1; 8, 6, 36, 24, ...
A096162(.,.) begins 1; 1; 2, 1; 1, 6, 1; 1, 2, 2, 24 ...
so
T(.,.) begins ..... 1; 1; 1, 1; 6, 1, 1; 8, 3, 18, 1 ...
		

Crossrefs

Formula

T(n,k) = A049019(n,k) / A096162(n,k) = A048996(n,k) * A036040(n,k).
Sum_{k=1..A000041(n)} T(n,k) = A120774(n).

Extensions

Extended, and bivariate indices restored - R. J. Mathar, Jul 13 2010
Showing 1-5 of 5 results.