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.

A105484 Number of partitions of {1...n} containing 2 strings of 3 consecutive integers, where each string is counted within a block and a string of more than 3 consecutive integers are counted three at a time.

Original entry on oeis.org

1, 2, 9, 38, 177, 882, 4711, 26795, 161583, 1028992, 6896067, 48487476, 356703531, 2738868784, 21901044795, 182022288438, 1569519971934, 14017732109520, 129480496353104, 1235228480628932, 12154988981496309, 123229919746398894, 1285758785855488107
Offset: 4

Views

Author

Augustine O. Munagi, Apr 10 2005

Keywords

Examples

			a(6)=9 because the partitions of {1,...,6} with 2 strings of 3 consecutive integers are 12346/5, 13456/2, 16/2345, 1234/56, 123/456, 12/3456, 1234/5/6, 1/2345/6, 1/2/3456.
		

Crossrefs

Programs

  • Maple
    c := proc(n,k,r) option remember ; local j ; if r =0 then add(binomial(n-j,j)*combinat[stirling2](n-j-1,k-1),j=0..floor(n/2)) ; else if r <0 or r > n-k-1 then RETURN(0) fi ; if n <1 then RETURN(0) fi ; if k <1 then RETURN(0) fi ; RETURN( c(n-1,k-1,r)+(k-1)*c(n-1,k,r)+c(n-2,k-1,r)+(k-1)*c(n-2,k,r) +c(n-1,k,r-1)-c(n-2,k-1,r-1)-(k-1)*c(n-2,k,r-1) ) ; fi ; end: A105484 := proc(n) local k ; add(c(n,k,2),k=1..n) ; end: for n from 4 to 27 do printf("%d, ",A105484(n)) ; od ; # R. J. Mathar, Feb 20 2007
  • Mathematica
    S2[_, -1] = 0;
    S2[n_, k_] = StirlingS2[n, k];
    c[n_, k_, r_] := c[n, k, r] = Which[r == 0, Sum[Binomial[n - j, j]*S2[n - j - 1, k - 1], {j, 0, Floor[n/2]}], r < 0 || r > n - k - 1, 0, n < 1, 0, k < 1, 0, True, c[n - 1, k - 1, r] + (k - 1)*c[n - 1, k, r] + c[n - 2, k - 1, r] + (k - 1)*c[n - 2, k, r] + c[n - 1, k, r - 1] - c[n - 2, k - 1, r - 1] - (k - 1)*c[n - 2, k, r - 1]];
    A105484[n_] := Sum[c[n, k, 2], {k, 1, n}];
    Table[A105484[n], {n, 4, 27}] (* Jean-François Alcover, May 10 2023, after R. J. Mathar *)

Formula

a(n) = Sum_{k=1..n} c(n, k, 2), where c(n, k, 2) is the case r =2 of c(n, k, r) given by c(n, k, r)=c(n-1, k-1, r)+(k-1)c(n-1, k, r)+c(n-2, k-1, r)+(k-1)c(n-2, k, r)+c(n-1, k, r-1)-c(n-2, k-1, r-1)-(k-1)c(n-2, k, r-1), r=0, 1, .., n-k-1, k=1, 2, .., n-2r, c(n, k, 0) = Sum_{j= 0..floor(n/2)} binomial(n-j, j)*S2(n-j-1, k-1).

Extensions

More terms from R. J. Mathar, Feb 20 2007

A105493 Number of partitions of {1,...,n} containing 3 strings of 3 consecutive integers such that only v-strings of consecutive integers can appear in a block, where v = 1,2,3.

Original entry on oeis.org

2, 20, 170, 1340, 10375, 80652, 636990, 5143740, 42613980, 362863600, 3178544754, 28650249848
Offset: 9

Views

Author

Augustine O. Munagi, Apr 11 2005

Keywords

Comments

Partitions enumerated by A105485 in which the maximal length of consecutive integers in a block is 3.

Examples

			a(9)=2, the enumerated partitions are 123/789/456, 123/456/789.
		

References

  • A. O. Munagi, Set Partitions with Successions and Separations, Int. J. Math and Math. Sc. 2005, no. 3 (2005), 451-463

Crossrefs

Formula

a(n)=Sum(w(n, k, 3), k=1...n), where w(n, k, 3) is the case r=3 of w(n, k, r) given by w(m, k, r)=w(m-1, k-1, r)+(k-1)w(m-1, k, r)+w(m-2, k-1, r)+(k-1)w(m-2, k, r) +w(m-3, k-1, r-1)+(k-1)w(m-3, k, r-1) r=0, 1, ..., floor(n/3), k=1, 2, ..., n-2r, w(n, k, 0)=sum(binomial(n-j, j)*S2(n-j-1, k-1), j=0..floor(n/2)).
Showing 1-2 of 2 results.