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.

Previous Showing 11-13 of 13 results.

A094251 Number of one-element transitions between all set partitions of n labeled elements.

Original entry on oeis.org

0, 0, 2, 18, 104, 580, 3282, 19236, 117672, 753048, 5041880, 35283402, 257718540, 1961679824, 15534932350, 127788932430, 1090212468512, 9632275777296, 88013486026710, 830637659785996, 8087069127986020, 81132805319035260, 837852685505824120, 8897619270153977254
Offset: 0

Views

Author

Thomas Wieder, Apr 25 2004

Keywords

Examples

			a(3) = 18 because there are 18 one-element transitions among the set partitions of n=3 elements ([x,z,y,...] means element 1 belongs to set x, element 2 belongs to set z, element 3 belongs to set y):
[1, 1, 1] -> [1, 1, 2]; [1, 1, 1] -> [1, 2, 1]; [1, 1, 1] -> [1, 2, 2];
[1, 1, 2] -> [1, 1, 1]; [1, 1, 2] -> [1, 2, 1]; [1, 1, 2] -> [1, 2, 2];
[1, 1, 2] -> [1, 2, 3]; [1, 2, 1] -> [1, 1, 1]; [1, 2, 1] -> [1, 1, 2];
[1, 2, 1] -> [1, 2, 2]; [1, 2, 1] -> [1, 2, 3]; [1, 2, 2] -> [1, 1, 1];
[1, 2, 2] -> [1, 1, 2]; [1, 2, 2] -> [1, 2, 1]; [1, 2, 2] -> [1, 2, 3];
[1, 2, 3] -> [1, 1, 2]; [1, 2, 3] -> [1, 2, 1]; [1, 2, 3] -> [1, 2, 2];
		

Crossrefs

Programs

  • Maple
    a:= proc(m) local b, r;
          b:= proc(n, i, p, l) local g, h, k;
                if i=0 then if n=0 then g:= l[1]; h:= l[2]; k:= l[3]+g+h;
                    r:= r+p*(g*(g-1)/2+g*(k-g)+h*(1+2*(k-1))+(m-g-2*h)*k) fi
              else b(n, i-1, p, `if`(i<3, [0, l[]], l));
                   seq(b(n-i*j, i-1, p*n!/(i!)^j/(n-i*j)!/j!,
                       `if`(i<3, [j, l[]], [l[]+j])), j=1..n/i)
                fi
              end;
          r:=0; b(m, max(m, 2), 1, [0]); r
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Apr 13 2012
  • Mathematica
    a[m_] := Module[{b, r}, b[n_, i_, p_, l_List] := Module[{g, h, k}, If[i == 0, If[n == 0, g = l[[1]]; h = l[[2]]; k = l[[3]] + g + h; r = r + p(g(g - 1)/2 + g(k - g) + h(1 + 2(k - 1)) + (m - g - 2h)k)], b[n, i - 1, p, If[i < 3, Prepend[l, 0], l]]; Table[b[n - i j, i - 1, p n!/(i!)^j/(n - i j)!/j!, If[i < 3, Prepend[l, j], l + j]], {j, 1, n/i}]]]; r = 0; b[m, Max[m, 2], 1, {0}]; r];
    a /@ Range[0, 25] (* Jean-François Alcover, Nov 18 2020, after Alois P. Heinz *)

Extensions

a(6)-a(23) from Alois P. Heinz, Apr 12 2012

A209633 Number of ordered set partitions of the multiset [a,a,1,1,...,1] with two "a" and n "1".

Original entry on oeis.org

1, 2, 7, 15, 33, 59, 111, 182, 307, 481, 757, 1134, 1713, 2483, 3611, 5117, 7238, 10029, 13888, 18900, 25682, 34442, 46057, 60934, 80428, 105159, 137137, 177495, 229069, 293694, 375582, 477499, 605526, 764060, 961603, 1204898, 1506142, 1875150, 2329185, 2882939
Offset: 0

Views

Author

Thomas Wieder, Mar 11 2012

Keywords

Comments

For [a,1,1,...1] one gets A093694, number of one-element transitions from the partitions of n to the partitions of n+1 for labeled parts.

Examples

			For n=4 we have the multiset [a,a,1,1,1,1] with the following a(4) = 33 ordered set partitions:
For [4] one gets [[1,1,1,1]], [[1,1,1,a]], [[1,1,a,a]].
For [3,1] one gets [[1,1,1],[1]], [[1,1,1],[a]], [[1,1,a],[1]], [[1,1,a],[a]], [[1,a,a],[1]].
For [2,2] one gets [[1,1],[1,1]], [[1,1],[1,a]], [[1,1],[a,a]], [[1,a],[1,1]], [[1,a],[1,a]], [[a,a],[1,1]].
For [2,1,1] one gets [[1,1],[1],[1]], [[1,1],[1],[a]], [[1,1],[a],[1]], [[1,1],[a],[a]], [[1,a],[1],[1]], [[1,a],[1],[a]], [[1,a],[a],[1]], [[a,a],[1],[1]].
For [1,1,1,1] one gets [[1],[1],[1],[1]], [[1],[1],[1],[a]], [[1],[1],[a],[1]], [[1],[1],[a],[a]], [[1],[a],[1],[1]], [[1],[a],[1],[a]], [[1],[a],[a],[1]], [[a],[1],[1],[1]], [[a],[1],[1],[a]], [[a],[1],[a],[1]], [[a],[a],[1],[1]].
		

Crossrefs

Cf. A093694.

Programs

  • Maple
    p:= (f, g)-> zip((x, y)-> x+y, f, g, 0):
    b:= proc(n,i) option remember; local f, g;
          if n=0 then [1, 0, [1]]
        elif i<1 then [0, 0, [0]]
        else f:= b(n, i-1); g:= `if`(i>n, [0, 0, [0]], b(n-i, i));
             [f[1]+g[1], f[2]+g[2] +`if`(i>1, g[1], 0), p(f[3], [0, g[3][]])]
          fi
        end:
    a:= proc(n) local l, ll;
          if n=0 then return 1 fi;
          l:= b(n, n); ll:= l[3];
          l[2] +add(ll[t+1] *(1+t* (1+(t-1)/2)), t=1..nops(ll)-1)
        end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Mar 11 2012
  • Mathematica
    zip = With[{m = Max[Length[#1], Length[#2]]}, PadRight[#1, m] + PadRight[#2, m]]&; b[n_, i_] := b[n, i] = Module[{f, g}, Which[n == 0, {1, 0, {1}}, i<1, {0, 0, {0}}, True, f = b[n, i-1]; g = If[i>n, {0, 0, {0}}, b[n-i, i]]; {f[[1]] + g[[1]], f[[2]] + g[[2]] + If[i>1, g[[1]], 0], zip[f[[3]], Join[{0}, g[[3]]]]}]]; a[n_] := Module[{l, ll}, If[n == 0, Return[1]]; l = b[n, n]; ll = l[[3]]; l[[2]] + Sum[ll[[t+1]]*(1+t*(1+(t-1)/2)), {t, 1, Length[ll]-1}]]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Feb 13 2017, after Alois P. Heinz *)

Extensions

More terms from Alois P. Heinz, Mar 11 2012

A228823 Triangle read by rows: T(n,k) = total number of parts in all partitions of n that contain k as a part, n>=1, 1<=k<=n.

Original entry on oeis.org

1, 2, 1, 5, 2, 1, 9, 5, 2, 1, 17, 9, 5, 2, 1, 27, 17, 9, 5, 2, 1, 46, 27, 17, 9, 5, 2, 1, 69, 46, 27, 17, 9, 5, 2, 1, 108, 69, 46, 27, 17, 9, 5, 2, 1, 158, 108, 69, 46, 27, 17, 9, 5, 2, 1, 234, 158, 108, 69, 46, 27, 17, 9, 5, 2, 1, 331, 234, 158, 108, 69
Offset: 1

Views

Author

Omar E. Pol, Sep 25 2013

Keywords

Comments

Row n lists the first n elements of A093694 in decreasing order.

Examples

			Triangle begins:
1;
2,     1;
5,     2,   1;
9,     5,   2,   1;
17,    9,   5,   2,  1;
27,   17,   9,   5,  2,  1;
46,   27,  17,   9,  5,  2,  1;
69,   46,  27,  17,  9,  5,  2,  1;
108,  69,  46,  27, 17,  9,  5,  2,  1;
158, 108,  69,  46, 27, 17,  9,  5,  2,  1;
234, 158, 108,  69, 46, 27, 17,  9,  5,  2,  1;
331, 234, 158, 108, 69, 46, 27, 17,  9,  5,  2,  1;
		

Crossrefs

Formula

T(n,k) = A000041(n-k) + A006128(n-k) = A093694(n-k).
Previous Showing 11-13 of 13 results.