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

A105479 a(n) = C(n,2)*Bell(n-2) (cf. A000217, A000110).

Original entry on oeis.org

0, 0, 1, 3, 12, 50, 225, 1092, 5684, 31572, 186300, 1163085, 7654350, 52928460, 383437327, 2902665885, 22907918640, 188082362120, 1603461748491, 14169892736484, 129594593170210, 1224875863061970, 11948280552370932, 120142063487658003, 1243853543811461148
Offset: 0

Views

Author

Augustine O. Munagi, Apr 10 2005

Keywords

Comments

Number of blocks of size 2 in all set partitions of {1,2,...,n}. Example: a(3)=3 because the set partitions of {1,2,3} are 1|2|3, 1|23, 12|3, 13|2 and 123, containing exactly 3 blocks of size 2. a(n) = Sum_{k>=0} k*A124498(n-1,k). - Emeric Deutsch, Nov 06 2006
Number of partitions of {1...n} containing 2 pairs of consecutive integers, where each pair is counted within a block and a string of more than 2 consecutive integers are counted two at a time. E.g. a(4) = 3 because the partitions of {1,2,3,4} with 2 pairs of consecutive integers are 123/4,12/34,1/234. - Augustine O. Munagi, Apr 10 2005
a(n) is the total sum of singletons in all set partitions of [n-1]. a(4) = 12 = 0+1+2+3+6: 123, 1|23, 13|2, 12|3, 1|2|3. - Alois P. Heinz, Mar 06 2024

Crossrefs

Column k=2 of A193297.

Programs

  • Maple
    [seq(binomial(n,2)*combinat[bell](n-2),n=0..50)];
  • Mathematica
    Join[{0,0},Table[Binomial[n,2]BellB[n-2],{n,2,30}]] (* Harvey P. Dale, May 06 2014 *)
  • Python
    from itertools import count, accumulate, islice
    def A105479_gen(): # generator of terms
        yield from (0,0,1)
        blist, b, c = (1,), 1, 1
        for n in count(2):
            c += n
            blist = list(accumulate(blist, initial=(b:=blist[-1])))
            yield b*c
    A105479_list = list(islice(A105479_gen(),20)) # Chai Wah Wu, Jun 22 2022

Formula

a(n) = binomial(n-1, 2)*Bell(n-3), the case r = 2 of the general case of r pairs: c(n, r) = binomial(n-1, r)*Bell(n-r-1).
E.g.f.: z^2/2 * e^(e^z-1) - Frank Ruskey, Dec 26 2006
G.f.: exp(-1)*Sum_{n>=0} (x^2/(n!*(1-n*x)^3)). - Vladeta Jovovic, Feb 05 2008
Let A be the upper Hessenberg matrix of order n defined by: A[i,i-1]=-1, A[i,j]=binomial(j-1,i-1), (i<=j), and A[i,j]=0 otherwise. Then, for n>=2, a(n)=(-1)^(n-2)coeff(charpoly(A,x),x^2). - Milan Janjic, Jul 08 2010
G.f.: x^2/exp(1)*G(0), where G(k) = 1 + (2*k*x-1)^3/((2*k+1)*(2*k*x+x-1)^3 - (2*k+1)*(2*k*x+x-1)^6/((2*k*x+x-1)^3 + 2*(k+1)*(2*k*x+2*x-1)^3/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 14 2013

Extensions

Edited by N. J. A. Sloane, Jan 01 2007

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).

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)).
Showing 1-5 of 5 results.