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-10 of 11 results. Next

A005493 2-Bell numbers: a(n) = number of partitions of [n+1] with a distinguished block.

Original entry on oeis.org

1, 3, 10, 37, 151, 674, 3263, 17007, 94828, 562595, 3535027, 23430840, 163254885, 1192059223, 9097183602, 72384727657, 599211936355, 5150665398898, 45891416030315, 423145657921379, 4031845922290572, 39645290116637023, 401806863439720943, 4192631462935194064
Offset: 0

Views

Author

Keywords

Comments

Number of Boolean sublattices of the Boolean lattice of subsets of {1..n}.
a(n) = p(n+1) where p(x) is the unique degree n polynomial such that p(k) = A000110(k+1) for k = 0, 1, ..., n. - Michael Somos, Oct 07 2003
With offset 1, number of permutations beginning with 12 and avoiding 21-3.
Rows sums of Bell's triangle (A011971). - Jorge Coveiro, Dec 26 2004
Number of blocks in all set partitions of an (n+1)-set. Example: a(2)=10 because the set partitions of {1,2,3} are 1|2|3, 1|23, 12|3, 13|2 and 123, with a total of 10 blocks. - Emeric Deutsch, Nov 13 2006
Number of partitions of n+3 with at least one singleton and with the smallest element in a singleton equal to 2. - Olivier Gérard, Oct 29 2007
See page 29, Theorem 5.6 of my paper on the arXiv: These numbers are the dimensions of the homogeneous components of the operad called ComTrip associated with commutative triplicial algebras. (Triplicial algebras are related to even trees and also to L-algebras, see A006013.) - Philippe Leroux, Nov 17 2007
Number of set partitions of (n+2) elements where two specific elements are clustered separately. Example: a(1)=3 because 1/2/3, 1/23, 13/2 are the 3 set partitions with 1, 2 clustered separately. - Andrey Goder (andy.goder(AT)gmail.com), Dec 17 2007
Equals A008277 * [1,2,3,...], i.e., the product of the Stirling number of the second kind triangle and the natural number vector. a(n+1) = row sums of triangle A137650. - Gary W. Adamson, Jan 31 2008
Prefaced with a "1" = row sums of triangle A152433. - Gary W. Adamson, Dec 04 2008
Equals row sums of triangle A159573. - Gary W. Adamson, Apr 16 2009
Number of embedded coalitions in an (n+1)-person game. - David Yeung (wkyeung(AT)hkbu.edu.hk), May 08 2008
If prefixed with 0, gives first differences of Bell numbers A000110 (cf. A106436). - N. J. A. Sloane, Aug 29 2013
Sum_{n>=0} a(n)/n! = e^(e+1) = 41.19355567... (see A235214). Contrast with e^(e-1) = Sum_{n>=0} A000110(n)/n!. - Richard R. Forberg, Jan 05 2014

Examples

			For example, a(1) counts (12), (1)-2, 1-(2) where dashes separate blocks and the distinguished block is parenthesized.
		

References

  • Olivier Gérard and Karol A. Penson, A budget of set partition statistics, in preparation. Unpublished as of 2017.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A row or column of the array A108087.
Row sums of triangle A143494. - Wolfdieter Lang, Sep 29 2011. And also of triangle A362924. - N. J. A. Sloane, Aug 10 2023

Programs

  • Maple
    with(combinat): seq(bell(n+2)-bell(n+1),n=0..22); # Emeric Deutsch, Nov 13 2006
    seq(add(binomial(n, k)*(bell(n-k)), k=1..n), n=1..23); # Zerinvary Lajos, Dec 01 2006
    A005493  := proc(n) local a,b,i;
    a := [seq(3,i=1..n)]; b := [seq(2,i=1..n)];
    2^n*exp(-x)*hypergeom(a,b,x); round(evalf(subs(x=1,%),66)) end:
    seq(A005493(n),n=0..22); # Peter Luschny, Mar 30 2011
    BT := proc(n,k) option remember; if n = 0 and k = 0 then 1
    elif k = n then BT(n-1,0) else BT(n,k+1)+BT(n-1,k) fi end:
    A005493 := n -> add(BT(n,k),k=0..n):
    seq(A005493(i),i=0..22); # Peter Luschny, Aug 04 2011
    # For Maple code for r-Bell numbers, etc., see A232472. - N. J. A. Sloane, Nov 27 2013
  • Mathematica
    a=Exp[x]-1; Rest[CoefficientList[Series[a Exp[a],{x,0,20}],x] * Table[n!,{n,0,20}]]
    a[ n_] := If[ n<0, 0, With[ {m = n+1}, m! SeriesCoefficient[ # Exp@# &[ Exp@x - 1], {x, 0, m}]]]; (* Michael Somos, Nov 16 2011 *)
    Differences[BellB[Range[30]]] (* Harvey P. Dale, Oct 16 2014 *)
  • PARI
    {a(n) = if( n<0, 0, n! * polcoeff( exp( exp( x + x * O(x^n)) + 2*x - 1), n))}; /* Michael Somos, Oct 09 2002 */
    
  • PARI
    {a(n) = if( n<0, 0, n+=2; subst( polinterpolate( Vec( serlaplace( exp( exp( x + O(x^n)) - 1) - 1))), x, n))}; /* Michael Somos, Oct 07 2003 */
    
  • Python
    # requires python 3.2 or higher. Otherwise use def'n of accumulate in python docs.
    from itertools import accumulate
    A005493_list, blist, b = [], [1], 1
    for _ in range(1001):
        blist = list(accumulate([b]+blist))
        b = blist[-1]
        A005493_list.append(blist[-2])
    # Chai Wah Wu, Sep 02 2014, updated Chai Wah Wu, Sep 20 2014

Formula

a(n-1) = Sum_{k=1..n} k*Stirling2(n, k) for n>=1.
E.g.f.: exp(exp(x) + 2*x - 1). First differences of Bell numbers (if offset 1). - Michael Somos, Oct 09 2002
G.f.: Sum_{k>=0} (x^k/Product_{l=1..k} (1-(l+1)x)). - Ralf Stephan, Apr 18 2004
a(n) = Sum_{i=0..n} 2^(n-i)*B(i)*binomial(n,i) where B(n) = Bell numbers A000110(n). - Fred Lunnon, Aug 04 2007 [Written umbrally, a(n) = (B+2)^n. - N. J. A. Sloane, Feb 07 2009]
Representation as an infinite series: a(n-1) = Sum_{k>=2} (k^n*(k-1)/k!)/exp(1), n=1, 2, ... This is a Dobinski-type summation formula. - Karol A. Penson, Mar 14 2002
Row sums of A011971 (Aitken's array, also called Bell triangle). - Philippe Deléham, Nov 15 2003
a(n) = exp(-1)*Sum_{k>=0} ((k+2)^n)/k!. - Gerald McGarvey, Jun 03 2004
Recurrence: a(n+1) = 1 + Sum_{j=1..n} (1+binomial(n, j))*a(j). - Jon Perry, Apr 25 2005
a(n) = A000296(n+3) - A000296(n+1). - Philippe Deléham, Jul 31 2005
a(n) = B(n+2) - B(n+1), where B(n) are Bell numbers (A000110). - Franklin T. Adams-Watters, Jul 13 2006
a(n) = A123158(n,2). - Philippe Deléham, Oct 06 2006
Binomial transform of Bell numbers 1, 2, 5, 15, 52, 203, 877, 4140, ... (see A000110).
Define f_1(x), f_2(x), ... such that f_1(x)=x*e^x, f_{n+1}(x) = (d/dx)(x*f_n(x)), for n=2,3,.... Then a(n-1) = e^(-1)*f_n(1). - Milan Janjic, May 30 2008
Representation of numbers a(n), n=0,1..., as special values of hypergeometric function of type (n)F(n), in Maple notation: a(n)=exp(-1)*2^n*hypergeom([3,3...3],[2.2...2],1), n=0,1..., i.e., having n parameters all equal to 3 in the numerator, having n parameters all equal to 2 in the denominator and the value of the argument equal to 1. Examples: a(0)= 2^0*evalf(hypergeom([],[],1)/exp(1))=1 a(1)= 2^1*evalf(hypergeom([3],[2],1)/exp(1))=3 a(2)= 2^2*evalf(hypergeom([3,3],[2,2],1)/exp(1))=10 a(3)= 2^3*evalf(hypergeom([3,3,3],[2,2,2],1)/exp(1))=37 a(4)= 2^4*evalf(hypergeom([3,3,3,3],[2,2,2,2],1)/exp(1))=151 a(5)= 2^5*evalf(hypergeom([3,3,3,3,3],[2,2,2,2,2],1)/exp(1)) = 674. - Karol A. Penson, Sep 28 2007
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 >= 1, a(n) = (-1)^(n)charpoly(A,-2). - Milan Janjic, Jul 08 2010
a(n) = D^(n+1)(x*exp(x)) evaluated at x = 0, where D is the operator (1+x)*d/dx. Cf. A003128, A052852 and A009737. - Peter Bala, Nov 25 2011
From Sergei N. Gladkovskii, Oct 11 2012 to Jan 26 2014: (Start)
Continued fractions:
G.f.: 1/U(0) where U(k) = 1 - x*(k+3) - x^2*(k+1)/U(k+1).
G.f.: 1/(U(0)-x) where U(k) = 1 - x - x*(k+1)/(1 - x/U(k+1)).
G.f.: G(0)/(1-x) where G(k) = 1 - 2*x*(k+1)/((2*k+1)*(2*x*k+2*x-1) - x*(2*k+1)*(2*k+3)*(2*x*k+2*x-1)/(x*(2*k+3) - 2*(k+1)*(2*x*k+3*x-1)/G(k+1) )).
G.f.: (G(0) - 1)/(x-1) where G(k) = 1 - 1/(1-2*x-k*x)/(1-x/(x-1/G(k+1) )).
G.f.: -G(0)/x where G(k) = 1 - 1/(1-k*x-x)/(1-x/(x-1/G(k+1) )).
G.f.: 1 - 2/x + (1/x-1)*S where S = sum(k>=0, ( 1 + (1-x)/(1-x-x*k) )*(x/(1-x))^k / prod(i=0..k-1, (1-x-x*i)/(1-x) ) ).
G.f.: (1-x)/x/(G(0)-x) - 1/x where G(k) = 1 - x*(k+1)/(1 - x/G(k+1) ).
G.f.: (1/G(0) - 1)/x^3 where G(k) = 1 - x/(x - 1/(1 + 1/(x*k-1)/G(k+1) )).
G.f.: 1/Q(0), where Q(k)= 1 - 2*x - x/(1 - x*(k+1)/Q(k+1)).
G.f.: G(0)/(1-3*x), where G(k) = 1 - x^2*(k+1)/( x^2*(k+1) - (1 - x*(k+3))*(1 - x*(k+4))/G(k+1) ). (End)
a(n) ~ exp(n/LambertW(n) + 3*LambertW(n)/2 - n - 1) * n^(n + 1/2) / LambertW(n)^(n+1). - Vaclav Kotesovec, Jun 09 2020
a(0) = 1; a(n) = 2 * a(n-1) + Sum_{k=0..n-1} binomial(n-1,k) * a(k). - Ilya Gutkovskiy, Jul 02 2020
a(n) ~ n^2 * Bell(n) / LambertW(n)^2 * (1 - LambertW(n)/n). - Vaclav Kotesovec, Jul 28 2021
a(n) = Sum_{k=0..n} 3^k*A124323(n, k). - Mélika Tebni, Jun 02 2022

Extensions

Definition revised by David Callan, Oct 11 2005

A011971 Aitken's array: triangle of numbers {a(n,k), n >= 0, 0 <= k <= n} read by rows, defined by a(0,0)=1, a(n,0) = a(n-1,n-1), a(n,k) = a(n,k-1) + a(n-1,k-1).

Original entry on oeis.org

1, 1, 2, 2, 3, 5, 5, 7, 10, 15, 15, 20, 27, 37, 52, 52, 67, 87, 114, 151, 203, 203, 255, 322, 409, 523, 674, 877, 877, 1080, 1335, 1657, 2066, 2589, 3263, 4140, 4140, 5017, 6097, 7432, 9089, 11155, 13744, 17007, 21147, 21147, 25287, 30304, 36401, 43833, 52922, 64077, 77821, 94828, 115975
Offset: 0

Views

Author

Keywords

Comments

Also called the Bell triangle or the Peirce triangle.
a(n,k) is the number of equivalence relations on {0, ..., n} such that k is not equivalent to n, k+1 is not equivalent to n, ..., n-1 is not equivalent to n. - Don Knuth, Sep 21 2002 [Comment revised by Thijs van Ommen (thijsvanommen(AT)gmail.com), Jul 13 2008]
Named after the New Zealand mathematician Alexander Craig Aitken (1895-1967). - Amiram Eldar, Jun 11 2021

Examples

			Triangle begins:
00:       1
01:       1      2
02:       2      3      5
03:       5      7     10     15
04:      15     20     27     37     52
05:      52     67     87    114    151    203
06:     203    255    322    409    523    674    877
07:     877   1080   1335   1657   2066   2589   3263   4140
08:    4140   5017   6097   7432   9089  11155  13744  17007  21147
09:   21147  25287  30304  36401  43833  52922  64077  77821  94828 115975
10:  115975 137122 162409 192713 229114 272947 325869 389946 467767 562595 678570
...
		

References

  • Jean-Paul Allouche and Jeffrey Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 205.
  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 212.
  • Donald E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Section 7.2.1.5 (p. 418).
  • Charles Sanders Peirce, On the Algebra of Logic, American Journal of Mathematics, Vol. 3, pages 15-57, 1880. Reprinted in Collected Papers (1935-1958) and in Writings of Charles S. Peirce: A Chronological Edition (Indiana University Press, Bloomington, IN, 1986).
  • Jeffrey Shallit, A triangle for the Bell numbers, in V. E. Hoggatt, Jr. and M. Bicknell-Johnson, A Collection of Manuscripts Related to the Fibonacci Sequence, 1980, pp. 69-71.

Crossrefs

Borders give Bell numbers A000110. Diagonals give A005493, A011965, A011966, etc., A011968, A011969. Cf. A046934, A011972 (duplicates removed).
Main diagonal is in A094577. Mirror image is in A123346.

Programs

  • GAP
    T:=Flat(List([0..9],n->List([0..n],k->Sum([0..k],i->Binomial(k,i)*Bell(n-k+i))))); # Muniru A Asiru, Oct 26 2018
  • Haskell
    a011971 n k = a011971_tabl !! n !! k
    a011971_row n = a011971_tabl !! n
    a011971_tabl = iterate (\row -> scanl (+) (last row) row) [1]
    -- Reinhard Zumkeller, Dec 09 2012
    
  • Maple
    A011971 := proc(n,k) option remember; if n=0 and k=0 then 1 elif k=0 then A011971(n-1,n-1) else A011971(n,k-1)+A011971(n-1,k-1); fi: end;
    for n from 0 to 12 do lprint([ seq(A011971(n,k),k=0..n) ]); od:
    # Compare the analogue algorithm for the Catalan numbers in A030237.
    BellTriangle := proc(len) local P, T, n; P := [1]; T := [[1]];
    for n from 1 to len - 1 do P := ListTools:-PartialSums([P[-1], op(P)]);
    T := [op(T), P] od; T end:
    BellTriangle(6); ListTools:-Flatten(%); # Peter Luschny, Mar 26 2022
  • Mathematica
    a[0, 0] = 1; a[n_, 0] := a[n, 0] = a[n-1, n-1]; a[n_, k_] := a[n, k] = a[n, k-1] + a[n-1, k-1]; Flatten[ Table[ a[n, k], {n, 0, 9}, {k, 0, n}]] (* Robert G. Wilson v, Mar 27 2004 *)
    Flatten[Table[Sum[Binomial[k, i]*BellB[n-k+i], {i, 0, k}], {n, 0, 9}, {k, 0, n}]] (* Jean-François Alcover, May 24 2016, after Vladeta Jovovic *)
  • Python
    # requires python 3.2 or higher. Otherwise use def'n of accumulate in python docs.
    from itertools import accumulate
    A011971 = blist = [1]
    for _ in range(10**2):
        b = blist[-1]
        blist = list(accumulate([b]+blist))
        A011971 += blist # Chai Wah Wu, Sep 02 2014, updated Chai Wah Wu, Sep 19 2014
    

Formula

Double-exponential generating function: Sum_{n, k} a(n-k, k) x^n y^k / n! k! = exp(e^{x+y}-1+x). - Don Knuth, Sep 21 2002 [U coordinates, reversed]
a(n,k) = Sum_{i=0..k} binomial(k,i)*Bell(n-k+i). - Vladeta Jovovic, Oct 15 2006

Extensions

Peirce reference from Jon Awbrey, Mar 11 2002
Reference to my paper from Jeffrey Shallit, Jan 23 2015
Moved a comment to A056857 where it belonged. - N. J. A. Sloane, May 02 2015.

A106436 Difference array of Bell numbers A000110 read by antidiagonals.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 1, 2, 3, 5, 4, 5, 7, 10, 15, 11, 15, 20, 27, 37, 52, 41, 52, 67, 87, 114, 151, 203, 162, 203, 255, 322, 409, 523, 674, 877, 715, 877, 1080, 1335, 1657, 2066, 2589, 3263, 4140, 3425, 4140, 5017, 6097, 7432, 9089, 11155, 13744, 17007, 21147
Offset: 0

Views

Author

Philippe Deléham, May 29 2005

Keywords

Comments

Essentially Aitken's array A011971 with first column A000296.
Mirror image of A182930. - Alois P. Heinz, Jan 29 2019

Examples

			   1;
   0,  1;
   1,  1,  2;
   1,  2,  3,  5;
   4,  5,  7, 10, 15;
  11, 15, 20, 27, 37, 52;
  ...
		

Crossrefs

T(2n,n) gives A020556.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, add(
          b(n-j)*binomial(n-1, j-1), j=1..n))
        end:
    T:= proc(n, k) option remember; `if`(k=0, b(n),
          T(n+1, k-1)-T(n, k-1))
        end:
    seq(seq(T(n, d-n), n=0..d), d=0..12);  # Alois P. Heinz, Jan 29 2019
  • Mathematica
    bb = Array[BellB, m = 12, 0];
    dd[n_] := Differences[bb, n];
    A = Array[dd, m, 0];
    Table[A[[n-k+1, k+1]], {n, 0, m-1}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 26 2019 *)
    a[0,0]:=1; a[n_,0]:=a[n-1,n-1]-a[n-1,0]; a[n_,k_]/;0Oliver Seipel, Nov 23 2024 *)

Formula

Double-exponential generating function: sum_{n, k} a(n-k, k) x^n/n! y^k/k! = exp(exp{x+y}-1-x). a(n,k) = Sum_{i=k..n} (-1)^(n-i)*binomial(n-k,i-k)*Bell(i). - Vladeta Jovovic, Oct 14 2006

A014145 Partial sums of A007489.

Original entry on oeis.org

0, 1, 4, 13, 46, 199, 1072, 6985, 53218, 462331, 4500244, 48454957, 571411270, 7321388383, 101249656696, 1502852293009, 23827244817322, 401839065437635, 7182224591785948, 135607710526966261, 2696935204638786574, 56349204870460046887, 1234002202313888987200
Offset: 0

Views

Author

Keywords

Examples

			a(4) = 1*4! + 2*3! + 3*2! + 4*1! = 46. - _Amarnath Murthy_, Sep 30 2003
		

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<3, n^2,
          (n+2)*a(n-1) -(2*n+1)*a(n-2) +n*a(n-3))
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Jun 16 2017
  • Mathematica
    Join[{0},Nest[Accumulate[#]&,Range[20]!,2]] (* Harvey P. Dale, Aug 05 2015 *)

Formula

a(n) = Sum_{k=1..n} k*(n+1-k)!. - Amarnath Murthy, Sep 30 2003
a(n) = A200545(n+1,1). - Philippe Deléham, Nov 19 2011
a(n) = (n+2)*a(n-1) -(2*n+1)*a(n-2) +n*a(n-3) for n > 2, a(n) = n^2 for n < 3. - Alois P. Heinz, Jun 16 2017
a(n) ~ n! * (1 + 2/n + 3/n^2 + 7/n^3 + 20/n^4 + 67/n^5 + 255/n^6 + 1080/n^7 + 5017/n^8 + 25287/n^9 + 137122/n^10 + ...), for coefficients see A011968. - Vaclav Kotesovec, Mar 30 2018

A190823 Number of permutations of 2 copies of 1..n introduced in order 1..n with no element equal to another within a distance of 2.

Original entry on oeis.org

1, 0, 0, 1, 10, 99, 1146, 15422, 237135, 4106680, 79154927, 1681383864, 39034539488, 983466451011, 26728184505750, 779476074425297, 24281301468714902, 804688068731837874, 28269541494090294129, 1049450257149017422000, 41050171013933837206545
Offset: 0

Views

Author

R. H. Hardin, May 21 2011

Keywords

Comments

From Gus Wiseman, Feb 27 2019: (Start)
Also the number of 2-uniform set partitions of {1..2n} such that no block has its two vertices differing by less than 3. For example, the a(4) = 10 set partitions are:
{{1,4}, {2,6}, {3,7}, {5,8}}
{{1,4}, {2,7}, {3,6}, {5,8}}
{{1,5}, {2,6}, {3,7}, {4,8}}
{{1,5}, {2,6}, {3,8}, {4,7}}
{{1,5}, {2,7}, {3,6}, {4,8}}
{{1,5}, {2,8}, {3,6}, {4,7}}
{{1,6}, {2,5}, {3,7}, {4,8}}
{{1,6}, {2,5}, {3,8}, {4,7}}
{{1,7}, {2,5}, {3,6}, {4,8}}
{{1,8}, {2,5}, {3,6}, {4,7}}
(End)

Examples

			All solutions for n=4 (read downwards):
  1    1    1    1    1    1    1    1    1    1
  2    2    2    2    2    2    2    2    2    2
  3    3    3    3    3    3    3    3    3    3
  4    4    4    4    1    4    4    1    4    4
  1    1    2    1    4    2    1    4    2    2
  3    3    1    2    2    3    2    3    1    3
  2    4    4    4    3    4    3    2    3    1
  4    2    3    3    4    1    4    4    4    4
		

Crossrefs

Distance of 1 instead of 2 gives |A000806|.
Column k=3 of A293157.
Cf. A000699, A001147 (2-uniform set partitions), A003436, A005493, A011968, A170941, A278990 (distance 2+ version), A306386 (cyclical version).

Programs

  • Magma
    I:=[1,0,0,1,10,99]; [n le 5 select I[n] else 2*n*Self(n-1) -2*(3*n-8)*Self(n-2) +2*(3*n-11)*Self(n-3) -2*(n-5)*Self(n-4) -Self(n-5): n in [1..40]]; // G. C. Greubel, Dec 03 2023
    
  • Mathematica
    a[0]=1; a[1]=0; a[2]=0; a[3]=1; a[4]=10; a[5]=99; a[n_] := a[n] = (2*n+2) a[n-1] - (6*n-10) a[n-2] + (6*n-16) a[n-3] - (2*n-8) a[n-4] - a[n-5]; Array[a, 20, 0] (* based on Sullivan's formula, Giovanni Resta, Mar 20 2017 *)
    dtui[{}]:={{}};dtui[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@dtui[Complement[set,s]]]/@Table[{i,j},{j,Select[set,#>i+2&]}];
    Table[Length[dtui[Range[n]]],{n,0,12,2}] (* Gus Wiseman, Feb 27 2019 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A190823
        if (n<6): return (1,0,0,1,10,99)[n]
        else: return 2*(n+1)*a(n-1) - 2*(3*n-5)*a(n-2) + 2*(3*n-8)*a(n-3) - 2*(n-4)*a(n-4) - a(n-5)
    [a(n) for n in range(41)] # G. C. Greubel, Dec 03 2023

Formula

a(n) = 2*(n+1)*a(n-1) - 2*(3*n-5)*a(n-2) + 2*(3*n-8)*a(n-3) - 2*(n-4)*a(n-4) - a(n-5) (proved). - Everett Sullivan, Mar 16 2017
a(n) ~ 2^(n+1/2) * n^n / exp(n+2), based on Sullivan's formula. - Vaclav Kotesovec, Mar 21 2017

Extensions

a(16)-a(20) (using Everett Sullivan's formula) from Giovanni Resta, Mar 20 2017
a(0)=1 prepended by Alois P. Heinz, Oct 17 2017

A011969 Apply (1+Shift)^2 to Bell numbers.

Original entry on oeis.org

1, 3, 5, 10, 27, 87, 322, 1335, 6097, 30304, 162409, 931667, 5686712, 36750201, 250401793, 1792401626, 13436958559, 105208112643, 858286687914, 7279760687179, 64071719451645, 584150874832552, 5508179528996197
Offset: 0

Views

Author

Keywords

Comments

Starting with n=2 (a(2)=5), number of set partitions of n+2 with at least one singleton and the smallest element in any singleton is exactly n-1. The maximum number of singletons is therefore 4. Alternatively, starting with n=2, number of set partitions of n+2 with at least one singleton and the largest element in any singleton is exactly 4. E.g. a(3)=10 counts the following set partitions of [5]: {1345, 2}, {13, 2, 45}, {145, 2, 3}, {134, 2, 5}, {15, 2, 34}, {135, 2, 4}, {14, 2, 35}, {13, 2, 4, 5}, {14, 2, 3, 5}, {15, 2, 3, 4}. - Olivier Gérard, Oct 29 2007
Let V(N)={v(1),v(2),...,v(N)} denote an ordered set of increasing positive integers containing 2 pairs of adjacent elements that differ by at least 2, that is, v(i),v(i+1) with v(i+1)-v(i)>1. Then for n>1, a(n) is the number of partitions of V(n+1) into blocks of nonconsecutive integers. - Augustine O. Munagi, Jul 17 2008

Examples

			a(3)=10 because the set {1,3,5,6} has 10 different partitions into blocks of nonconsecutive integers: 15/36, 16/35, 135/6, 136/5, 1/35/6, 1/36/5, 13/5/6, 15/3/6, 16/3/5, 1/3/5/6.
		

References

  • Olivier Gérard and Karol Penson, A budget of set partitions statistics, in preparation, unpublished as of Sep 22 2011

Crossrefs

A diagonal of A011971 and A106436. - N. J. A. Sloane, Jul 31 2012

Programs

  • Maple
    with(combinat): 1,3,seq(`if`(n>1,bell(n)+2*bell(n-1)+bell(n-2),NULL),n=2..22); # Augustine O. Munagi, Jul 17 2008
  • Mathematica
    Join[{1,3},#[[1]]+2#[[2]]+#[[3]]&/@Partition[BellB[Range[0,30]],3,1]] (* Harvey P. Dale, May 05 2023 *)
  • Python
    # requires python 3.2 or higher. Otherwise use def'n of accumulate in python docs.
    from itertools import accumulate
    A011969_list, blist, b, b2 = [1,3], [1], 1, 1
    for _ in range(10**2):
        blist = list(accumulate([b]+blist))
        A011969_list.append(2*b+b2+blist[-1])
        b2, b = b, blist[-1]
    # Chai Wah Wu, Sep 02 2014, updated Chai Wah Wu, Sep 20 2014

Formula

For n >= 1, a(n+2) = exp(-1)*Sum_{k>=0} (k+1)^2/k!*k^n. - Benoit Cloitre, Mar 09 2008
If n>1, then a(n) = Bell(n) + 2*Bell(n-1) + Bell(n-2). - Augustine O. Munagi, Jul 17 2008
G.f.: -(1+2*x)*(1+x)^2*Sum_{k>=0} x^(2*k)*(4*x*k^2-2*k-2*x-1)/((2*k+1)*(2*x*k-1))*A(k)/B(k) where A(k) = Product_{p=0..k} (2*p+1), B(k) = Product_{p=0..k} (2*p-1)*(2*x*p-x-1)*(2*x*p-2*x-1). - Sergei N. Gladkovskii, Jan 03 2013 [corrected by Jason Yuen, Apr 03 2025]
G.f.: G(0)*(1+x) where G(k) = 1 - 2*x*(k+1)/((2*k+1)*(2*x*k-1) - x*(2*k+1)*(2*k+3)*(2*x*k-1)/(x*(2*k+3) - 2*(k+1)*(2*x*k+x-1)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jan 03 2013
a(n) ~ Bell(n) * (1 + 2*LambertW(n)/n). - Vaclav Kotesovec, Jul 28 2021

A123346 Mirror image of the Bell triangle A011971, which is also called the Pierce triangle or Aitken's array.

Original entry on oeis.org

1, 2, 1, 5, 3, 2, 15, 10, 7, 5, 52, 37, 27, 20, 15, 203, 151, 114, 87, 67, 52, 877, 674, 523, 409, 322, 255, 203, 4140, 3263, 2589, 2066, 1657, 1335, 1080, 877, 21147, 17007, 13744, 11155, 9089, 7432, 6097, 5017, 4140, 115975, 94828, 77821, 64077, 52922, 43833, 36401, 30304, 25287, 21147
Offset: 0

Views

Author

N. J. A. Sloane, Oct 14 2006

Keywords

Comments

a(n,k) is k-th difference of Bell numbers, with a(n,1) = A000110(n) for n>0, a(n,k) = a(n,k-1) - a(n-1, k-1), k<=n, with diagonal (k=n) also equal to Bell numbers (n>=0). - Richard R. Forberg, Jul 13 2013
From Don Knuth, Jan 29 2018: (Start)
If the offset here is changed from 0 to 1, then we can say:
a(n,k) is the number of equivalence classes of [n] in which 1 not equiv to 2, ..., 1 not equiv to k.
In Volume 4A, page 418, I pointed out that a(n,k) is the number of set partitions in which k is the smallest of its block.
And in exercise 7.2.1.5--33, I pointed out that a(n,k) is the number of equivalence relations in which 1 not equiv to 2, 2 not equiv to 3, ..., k-1 not equiv to k. (End)

Examples

			Triangle begins:
    1
    2   1
    5   3   2
   15  10   7  5
   52  37  27 20 15
  203 151 114 87 67 52
  ...
		

References

  • D. E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Section 7.2.1.5 (p. 418).

Crossrefs

Cf. A011971. Borders give Bell numbers A000110. Diagonals give A005493, A011965, A011966, A011968, A011969, A046934, A011972, A094577, A095149, A106436, A108041, A108042, A108043.

Programs

  • Haskell
    a123346 n k = a123346_tabl !! n !! k
    a123346_row n = a123346_tabl !! n
    a123346_tabl = map reverse a011971_tabl
    -- Reinhard Zumkeller, Dec 09 2012
    
  • Mathematica
    a[n_, k_] := Sum[Binomial[n - k, i - k] BellB[i], {i, k, n}];
    Table[a[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Aug 03 2018 *)
  • Python
    # requires python 3.2 or higher. Otherwise use def'n of accumulate in python docs.
    from itertools import accumulate
    A123346_list = blist = [1]
    for _ in range(2*10**2):
        b = blist[-1]
        blist = list(accumulate([b]+blist))
        A123346_list += reversed(blist)
    # Chai Wah Wu, Sep 02 2014, updated Chai Wah Wu, Sep 20 2014

Formula

a(n,k) = Sum_{i=k..n} binomial(n-k,i-k)*Bell(i). - Vladeta Jovovic, Oct 14 2006

Extensions

More terms from Alexander Adamchuk and Vladeta Jovovic, Oct 14 2006

A011970 Apply (1+Shift)^3 to Bell numbers.

Original entry on oeis.org

1, 4, 8, 15, 37, 114, 409, 1657, 7432, 36401, 192713, 1094076, 6618379, 42436913, 287151994, 2042803419, 15229360185, 118645071202, 963494800557, 8138047375093, 71351480138824, 648222594284197, 6092330403828749
Offset: 0

Views

Author

Keywords

Comments

Starting with n=3 (a(3)=15), number of set partitions of n+2 with at least one singleton and the smallest element in any singleton is exactly n-2. The maximum number of singletons is therefore 5. Alternatively, starting with n=3, number of set partitions of n+2 with at least one singleton and the largest element in any singleton is exactly 5. - Olivier Gérard, Oct 29 2007
Let V(N)={v(1),v(2),...,v(N)} denote an ordered set of increasing positive integers containing 3 pairs of adjacent elements that differ by at least 2, that is, v(i),v(i+1) with v(i+1)-v(i)>1. Then for n>2, a(n) is the number of partitions of V(n+1) into blocks of nonconsecutive integers. - Augustine O. Munagi, Jul 17 2008

Examples

			a(3)=15 because the set {1,3,5,7} has 15 different partitions which are necessarily into blocks of nonconsecutive integers.
		

References

  • Olivier Gérard and Karol Penson, A budget of set partitions statistics, in preparation, unpublished as of Sep 22 2011

Crossrefs

Cf. A000110.
A diagonal of A011971 and A106436. - N. J. A. Sloane, Jul 31 2012

Programs

  • Maple
    with(combinat): 1,4,8,seq(`if`(n>2,bell(n)+3*bell(n-1)+3*bell(n-2)+bell(n-3),NULL),n=3..22); # Augustine O. Munagi, Jul 17 2008
  • Python
    # requires python 3.2 or higher. Otherwise use def'n of accumulate in python docs.
    from itertools import accumulate
    A011970_list, blist, b, b2, b3 = [1,4,8], [1, 2], 2, 1, 1
    for _ in range(498):
        blist = list(accumulate([b]+blist))
        A011970_list.append(3*(b+b2)+b3+blist[-1])
        b3, b2, b = b2, b, blist[-1]
    # Chai Wah Wu, Sep 02 2014, updated Chai Wah Wu, Sep 20 2014

Formula

If n>2, then bell(n)+3*bell(n-1)+3*bell(n-2)+bell(n-3). - Augustine O. Munagi, Jul 17 2008

A207978 Number of n X 2 nonnegative integer arrays with new values 0 upwards introduced in row major order and no element equal to any diagonal or antidiagonal neighbor (colorings ignoring permutations of colors).

Original entry on oeis.org

1, 2, 7, 67, 1080, 25287, 794545, 31858034, 1573857867, 93345011951, 6514819011216, 526593974392123, 48658721593531669, 5084549201524804642, 595348294459678745663, 77500341343460209843627, 11140107960738185817545800, 1757660562895916320583653791
Offset: 0

Views

Author

R. H. Hardin, Feb 22 2012

Keywords

Comments

Column 2 of A207981.
a(n) is equal to the number of set partitions of {1,2,...,2n} such that k and k+2 do not appear in the same block for any k. - Andrew Howroyd , May 23 2023
a(n) is equal to the number of set partitions of {1,2,...,2n} such that the only sets of size 1 in the set partition are either {1} or {2}.
a(n) is also the dimension of the centralizer algebra End_{S_m}((V^{(m-1,1)}{S_m})^{\otimes n-1} \otimes V_m ) where V^{(m-1,1)}{S_m} is an irreducible S_m module indexed by (m-1,1) and V_m is the permutation module for S_m (with the condition that m is sufficiently large). - Mike Zabrocki, May 23 2023

Examples

			Some solutions for n=4:
..0..0....0..0....0..0....0..0....0..0....0..0....0..1....0..0....0..0....0..1
..1..1....1..1....1..1....1..1....1..1....1..1....0..1....1..1....1..1....2..1
..2..3....2..0....2..0....2..2....0..2....0..0....0..1....0..2....0..2....0..1
..2..0....3..3....1..0....3..4....3..1....1..1....0..1....3..4....0..1....0..1
The set partitions of 4 where at most {1} and {2} are the only sets of size 1 are {1234}, {1|234}, {2|134}, {12|34}, {13|24}, {14|23}, {1|2|34} - _Mike Zabrocki_, May 23 2023
		

Crossrefs

Programs

  • Maple
    a:=n->add((-1)^s*binomial(2*n-2, s) * combinat[bell](2*n-s), s = 0 .. 2*n); # Mike Zabrocki, May 23 2023
    # second Maple program:
    b:= proc(n) option remember; `if`(n=0, 1,
          add(b(n-j)*binomial(n-1, j-1), j=1..n))
        end:
    a:= n-> `if`(n=0, 1, b(2*n-1)+b(2*n-2)):
    seq(a(n), n=0..19);  # Alois P. Heinz, May 30 2023
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1, Sum[b[n-j] Binomial[n-1, j-1], {j, 1, n}]];
    a[n_] := If[n == 0, 1, b[2n-1] + b[2n-2]];
    Table[a[n], {n, 0, 19}] (* Jean-François Alcover, Feb 17 2024, after Alois P. Heinz *)
  • Sage
    a = lambda n: sum((-1)**s*binomial(2*n-2,s)*bell_number(2*n-s) for s in range(2*n-2+1)) # Mike Zabrocki, May 23 2023

Formula

a(n) = Sum_{s=0..2n} (-1)^s binomial(2n-2,s) Bell(2n-s). - Mike Zabrocki, May 23 2023
a(n) = A011968(2*n-1) for n>=1. - Alois P. Heinz, May 30 2023

Extensions

New description and a formula added by Mike Zabrocki, May 23 2023
a(0)=1 prepended by Alois P. Heinz, May 30 2023

A363550 Number of partitions of [n] having exactly one parity change within the partition.

Original entry on oeis.org

0, 0, 2, 1, 3, 2, 7, 5, 20, 15, 67, 52, 255, 203, 1080, 877, 5017, 4140, 25287, 21147, 137122, 115975, 794545, 678570, 4892167, 4213597, 31858034, 27644437, 218543759, 190899322, 1573857867, 1382958545, 11863100692, 10480142147, 93345011951, 82864869804
Offset: 0

Views

Author

Alois P. Heinz, Jun 09 2023

Keywords

Comments

The blocks are ordered with increasing least elements.

Examples

			a(2) = 2: 12, 1|2.
a(3) = 1: 13|2.
a(4) = 3: 134|2, 13|24, 13|2|4.
a(5) = 2: 135|24, 135|2|4.
a(6) = 7: 1356|24, 135|246, 135|24|6, 1356|2|4, 135|26|4, 135|2|46, 135|2|4|6.
a(7) = 5: 1357|246, 1357|24|6, 1357|26|4, 1357|2|46, 1357|2|4|6.
a(8) = 20: 13578|246, 1357|2468, 1357|246|8, 13578|24|6, 1357|248|6, 1357|24|68, 1357|24|6|8, 13578|26|4, 1357|268|4, 1357|26|48, 1357|26|4|8, 13578|2|46, 1357|28|46, 1357|2|468, 1357|2|46|8, 13578|2|4|6, 1357|28|4|6, 1357|2|48|6, 1357|2|4|68, 1357|2|4|6|8.
		

Crossrefs

Column k=1 of A363519.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1,
          add(b(n-j)*binomial(n-1, j-1), j=1..n))
        end:
    a:= n-> `if`(n<2, 0, (h-> b(h)+`if`(n::even, b(h-1), 0))(iquo(n, 2))):
    seq(a(n), n=0..35);

Formula

a(0) = a(1) = 0, for n>=2: a(n) = A000110((n-1)/2) if n is odd, a(n) = A011968(n/2) if n is even.
a(2*n) = a(2*n-1) + a(2*n+1) for n>=2.
Showing 1-10 of 11 results. Next