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

A105485 Number of partitions of {1...n} containing 3 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, 10, 44, 215, 1112, 6141, 35968, 222659, 1451770, 9939702, 71265036, 533744979, 4166533826, 33831424388, 285213338300, 2492259168784, 22538314947452, 210639529104328, 2031804667766532, 20203377516199587, 206861906112012524, 2178715175981722659
Offset: 5

Views

Author

Augustine O. Munagi, Apr 10 2005

Keywords

Examples

			a(6)=2 because the partitions of {1,...,6} with 3 strings of 3 consecutive integers are 12345/6, 1/23456.
		

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: A105485 := proc(n) local k ; add(c(n,k,3),k=1..n) ; end: for n from 5 to 28 do printf("%d, ",A105485(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]];
    A105485[n_] := Sum[c[n, k, 3], {k, 1, n}];
    Table[A105485[n], {n, 5, 28}] (* Jean-François Alcover, May 10 2023, after R. J. Mathar *)

Formula

a(n) = Sum_{k=1..n} c(n, k, 3), where c(n, k, 3) is the case r=3 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

A105483 Number of partitions of {1...n} containing one string of 3 consecutive integers, counted within a block.

Original entry on oeis.org

1, 2, 8, 32, 141, 672, 3451, 18962, 110882, 686866, 4489422, 30853656, 222276063, 1674067342, 13149209956, 107481488424, 912490408782, 8031867965568, 73181346933680, 689194657064660, 6699707386510583, 67143409071264516, 692926011957479445, 7356058078964945382
Offset: 3

Views

Author

Augustine O. Munagi, Apr 10 2005

Keywords

Examples

			a(5) = 8 because the partitions of {1,2,3,4,5} with one 3-string of consecutive integers are 1235/4, 1345/2, 15/234, 123/45, 12/345, 123/4/5, 1/234/5, 1/2/345.
		

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: A105483 := proc(n) local k ; add(c(n,k,1),k=1..n) ; end: for n from 3 to 26 do printf("%d, ",A105483(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]];
    A105483[n_] := Sum[c[n, k, 1], {k, 1, n}];
    Table[A105483[n], {n, 3, 26}] (* Jean-François Alcover, May 10 2023, after R. J. Mathar *)

Formula

a(n) = Sum_{k=1..n} c(n, k, 1), where c(n, k, 1) is the case r=1 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_{0..floor(n/2)} binomial(n-j, j)*S2(n-j-1, k-1).

Extensions

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

A105492 Number of partitions of {1,...,n} containing 2 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

1, 6, 36, 210, 1260, 7833, 50701, 342126, 2406645, 17633820, 134427468, 1064801442, 8751834839, 74540800014
Offset: 6

Views

Author

Augustine O. Munagi, Apr 11 2005

Keywords

Comments

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

Examples

			a(7)=6; the enumerated partitions are 123567/4, 1237/456, 1567/234, 123/456/7, 123/4/567, 1/234/567.
		

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, 2), k=1...n), where w(n, k, 2) is the case r=2 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)).

A105494 Number of partitions of {1,...,n} containing 4 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

5, 75, 855, 8665, 83485, 788515, 7424515, 70378930, 675685240, 6594991405, 65598204272
Offset: 12

Views

Author

Augustine O. Munagi, Apr 11 2005

Keywords

Comments

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

Examples

			a(12)=5, the enumerated partitions are (1,2,3,7,8,9)(4,5,6,10,11,12),
(1,2,3,7,8,9)(4,5,6)(10,11,12), (1,2,3)(4,5,6,10,11,12)(7,8,9),
(1,2,3,10,11,12)(4,5,6)(7,8,9), (1,2,3)(4,5,6)(7,8,9) (10,11,12).
		

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, 4), k=1...n), where w(n, k, 4) is the case r=4 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-4 of 4 results.