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.

A105488 Number of partitions of {1...n} containing 2 detached pairs of consecutive integers, i.e., partitions in which only 1- or 2-strings of consecutive integers can appear in a block and there are exactly two 2-strings.

Original entry on oeis.org

1, 6, 30, 150, 780, 4263, 24556, 149040, 951615, 6378625, 44785620, 328660566, 2515643767, 20044428810, 165955025400, 1425299331992, 12678325080012, 116635133853189, 1108221018960830, 10862073229428120, 109694927532209481, 1140199081827172719
Offset: 4

Views

Author

Augustine O. Munagi, Apr 10 2005

Keywords

Comments

Number of partitions enumerated by A105479 in which the maximal length of consecutive integers in a block is 2.
With offset 2t, number of partitions of {1...N} containing 2 detached strings of t consecutive integers, where N=n+2j, t=2+j, j = 0,1,2,..., i.e., partitions of [n] in which only v-strings of consecutive integers can appear in a block, where v=1 or v=t and there are exactly two t-strings.
Equals the minimum of the sum of the Rand distances over all A000110(n) set partitions of n elements. E.g. a(3) = 6 because over the 5 set partitions of {1, 2, 3} the sum of Rand distances from {{1}, {2}, {3}} to the rest is 6. - Andrey Goder (andy.goder(AT)gmail.com), Dec 08 2006
a(n+3) = A000110(n) * A000217(n) = Sum_{k=1..n} A285362(n,k) is the sum of the entries in all set partitions of [n]. - Alois P. Heinz, Apr 16 2017

Examples

			a(5)=6 because the partitions of {1,2,3,4,5} with 2 detached pairs of consecutive integers are 145/23,125/34,1245/3,12/34/5,12/3/45,1/23/45.
		

Crossrefs

Programs

  • Maple
    seq(binomial(n-2,2)*combinat[bell](n-3),n=4..28);
  • Mathematica
    a[n_] := Binomial[n-2, 2]*BellB[n-3];
    Table[a[n], {n, 4, 25}] (* Jean-François Alcover, May 11 2019 *)

Formula

a(n) = binomial(n-2, 2)*Bell(n-3), which is the case r = 2 in the general case of r pairs, d(n, r)=binomial(n-r, r)*Bell(n-r-1), which is the case t=2 of the general formula d(n, r, t)=binomial(n-r*(t-1), r)*B(n-r*(t-1)-1).

A271024 Number T(n,k) of set partitions of [n] having exactly k pairs (i,j) with i < j such that i and j are in different blocks; triangle T(n,k), n >= 0, 0 <= k <= n*(n-1)/2 read by rows.

Original entry on oeis.org

1, 1, 1, 1, 1, 0, 3, 1, 1, 0, 0, 4, 3, 6, 1, 1, 0, 0, 0, 5, 0, 10, 10, 15, 10, 1, 1, 0, 0, 0, 0, 6, 0, 0, 15, 25, 0, 60, 35, 45, 15, 1, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 21, 21, 35, 0, 105, 105, 105, 210, 140, 105, 21, 1, 1, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 28, 28
Offset: 0

Views

Author

Alois P. Heinz, Mar 28 2016

Keywords

Examples

			T(3,0) = 1: 123.
T(3,2) = 3: 12|3, 13|2, 1|23.
T(3,3) = 1: 1|2|3.
Triangle T(n,k) begins:
  1;
  1;
  1, 1;
  1, 0, 3, 1;
  1, 0, 0, 4, 3, 6,  1;
  1, 0, 0, 0, 5, 0, 10, 10, 15, 10, 1;
  1, 0, 0, 0, 0, 6,  0,  0, 15, 25, 0, 60, 35, 45, 15, 1;
		

Crossrefs

Row sums give A000110.

Programs

  • Maple
    b:= proc(n, l) option remember; `if`(n=0, x^(m->
          add(j*(m-j)/2, j=l))(add(i, i=l)), b(n-1, [l[], 1])+
          add(b(n-1, subsop(j=l[j]+1, l)), j=1..nops(l)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, [])):
    seq(T(n), n=0..10);
  • Mathematica
    b[n_, l_] := b[n, l] = If[n == 0, x^Function[m, Sum[(1/2)*j*(m - j), {j, l}]][Total[l]], Sum[b[n - 1, ReplacePart[l, j -> l[[j]] + 1]], {j, 1, Length[l]}] + b[n - 1, Append[l, 1]]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, {}]];
    Flatten[Table[T[n], {n, 0, 10}]] (* Jean-François Alcover, May 27 2018, translated from Maple *)

Formula

T(n,k) = A271023(n,n*(n-1)/2-k).
T(n,n-1) = n for n >= 3.
Showing 1-2 of 2 results.