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

A258466 Number of partitions of n into parts of sorts {1, 2, ... } which are introduced in ascending order.

Original entry on oeis.org

1, 1, 3, 8, 25, 82, 307, 1256, 5688, 28044, 149598, 855811, 5217604, 33711592, 229798958, 1646312694, 12355368849, 96861178984, 791258781708, 6720627124140, 59234364096426, 540812222095821, 5106663817156741, 49798678280227488, 500857393908312587
Offset: 0

Views

Author

Alois P. Heinz, May 30 2015

Keywords

Comments

Also number of ways of partitioning a multiset with multiplicities some partition of n into disjoint blocks. Example: a(4) = 25: 1111; 111,2; 1112; 11,22; 1122; 11,2,3; 11,23; 112,3; 113,2; 1123; 1,2,3,4; 1,2,34; 1,23,4; 1,24,3; 1,234; 12,3,4; 12,34; 13,2,4; 13,24; 14,2,3; 14,23; 123,4; 124,3; 134,2; 1234. Formula: a(n) is the sum of Bell numbers of lengths of all integer partitions of n. - Gus Wiseman, Feb 17 2016

Examples

			a(3) = 8: 1a1a1a, 2a1a, 3a, 1a1a1b, 1a1b1a, 1a1b1b, 2a1b, 1a1b1c (in this example the sorts are labeled a, b, c).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1, k) +`if`(i>n, 0, k*b(n-i, i, k))))
        end:
    T:= (n, k)-> add(b(n$2, k-i)*(-1)^i/(i!*(k-i)!), i=0..k):
    a:= n-> add(T(n, k), k=0..n):
    seq(a(n), n=0..25);
  • Mathematica
    Table[Plus @@ BellB /@ Length /@ IntegerPartitions[n], {n, 0, 24}] (* Gus Wiseman, Feb 17 2016 *)
    b[n_, i_, k_] := b[n, i, k] = If[n==0, 1, If[i<1, 0, b[n, i-1, k] + If[i>n, 0, k*b[n-i, i, k]]]]; T[n_, k_] := Sum[b[n, n, k-i]*(-1)^i/(i!*(k-i)!), {i, 0, k}]; a[n_] := Sum[T[n, k], {k, 0, n}]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Sep 01 2016, after Alois P. Heinz *)

Formula

a(n) = Sum_{k=0..n} A256130(n,k).
a(n) ~ Bell(n) = A000110(n). - Vaclav Kotesovec, Jun 01 2015
G.f.: Sum_{k>=0} Bell(k) * x^k / Product_{j=1..k} (1 - x^j). - Ilya Gutkovskiy, Jan 28 2020

A262495 Number T(n,k) of partitions of n into parts of exactly k sorts which are introduced in ascending order such that sorts of adjacent parts are different; 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, 2, 1, 0, 1, 4, 4, 1, 0, 1, 6, 12, 7, 1, 0, 1, 10, 31, 33, 11, 1, 0, 1, 14, 73, 130, 77, 16, 1, 0, 1, 21, 165, 464, 438, 157, 22, 1, 0, 1, 29, 357, 1558, 2216, 1223, 289, 29, 1, 0, 1, 41, 760, 5039, 10423, 8331, 2957, 492, 37, 1
Offset: 0

Views

Author

Alois P. Heinz, Sep 24 2015

Keywords

Examples

			T(3,1) = 1: 3a.
T(3,2) = 2: 2a1b, 1a1b1a.
T(3,3) = 1: 1a1b1c.
T(5,3) = 12: 3a1b1c, 2a2b1c, 2a1b1a1c, 2a1b1c1a, 2a1b1c1b, 1a1b1a1b1c, 1a1b1a1c1a, 1a1b1a1c1b, 1a1b1c1a1b, 1a1b1c1a1c, 1a1b1c1b1a, 1a1b1c1b1c.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1,  1;
  0, 1,  2,   1;
  0, 1,  4,   4,    1;
  0, 1,  6,  12,    7,     1;
  0, 1, 10,  31,   33,    11,    1;
  0, 1, 14,  73,  130,    77,   16,    1;
  0, 1, 21, 165,  464,   438,  157,   22,   1;
  0, 1, 29, 357, 1558,  2216, 1223,  289,  29,  1;
  0, 1, 41, 760, 5039, 10423, 8331, 2957, 492, 37, 1;
  ...
		

Crossrefs

Main diagonal and lower diagonal give: A000012, A000124 (shifted).
Row sums give A262496.
T(2n,n) gives A262529.
Cf. A256130.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0 or i=1, k^(n-1),
          b(n, i-1, k) +`if`(i>n, 0, k*b(n-i, i, k)))
        end:
    A:= (n, k)-> `if`(n=0, 1, `if`(k<2, k, k*b(n$2, k-1))):
    T:= (n, k)-> add(A(n, k-i)*(-1)^i/(i!*(k-i)!), i=0..k):
    seq(seq(T(n, k), k=0..n), n=0..12);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0 || i == 1, k^(n-1), b[n, i-1, k] + If[i>n, 0, k*b[n-i, i, k]]]; A[n_, k_] := If[n == 0, 1, If[k<2, k, k*b[n, n, k-1]]]; T[n_, k_] := Sum[A[n, k-i]*(-1)^i/(i!*(k-i)!), {i, 0, k}]; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 24 2017, translated from Maple *)
Showing 1-2 of 2 results.