A184175 Number of set partitions of {1,2,...,n} having no blocks of the form {i, i+1}.
1, 1, 1, 3, 10, 35, 139, 611, 2925, 15128, 83903, 495929, 3108129, 20565721, 143134606, 1044489265, 7968879387, 63407648443, 525016067171, 4514661402304, 40245681692885, 371319303282381, 3540506731807277, 34840411462506887, 353394158240095874, 3690577066014598575
Offset: 0
Keywords
Examples
a(3)=3 because we have 1-2-3, 13-2, and 123. a(4)=10 because among the 15 (=bell(4)) partitions of {1,2,3,4} only 12-34, 14-23, 12-3-4, 1-23-4, and 1-2-34, have adjacent blocks of size 2. Contribution from _Paul D. Hanna_, Sep 03 2017: (Start) G.f.: A(x) = 1 + x + x^2 + 3*x^3 + 10*x^4 + 35*x^5 + 139*x^6 + 611*x^7 + 2925*x^8 + 15128*x^9 + 83903*x^10 + 495929*x^11 + 3108129*x^12 +... where G.f.: A(x) = 1/(1+x^2) + x/((1+x^2)*(1-x+x^2)) + x^2/((1+x^2)*(1-x+x^2)*(1-2*x+x^2)) + x^3/((1+x^2)*(1-x+x^2)*(1-2*x+x^2)*(1-3*x+x^2)) +... (End)
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..550
Programs
-
Maple
with(combinat): seq(add((-1)^j*binomial(n-j, j)*bell(n-2*j), j = 0 .. floor((1/2)*n)), n = 0 .. 25);
-
Mathematica
Table[Sum[(-1)^j*Binomial[n-j, j]*BellB[n-2*j], {j, 0, Floor[n/2]}], {n, 0, 25}] (* Jean-François Alcover, Feb 22 2017, translated from Maple *)
-
PARI
{a(n) = my(A = sum(m=0,n, x^m/prod(k=0,m,1-k*x+x^2 +x*O(x^n)))); polcoeff(A,n)} for(n=0,30,print1(a(n),", ")) \\ Paul D. Hanna, Sep 03 2017
Formula
a(n) = Sum((-1)^j*binomial(n-j,j)*bell(n-2j), j=0..floor(n/2)).
G.f.: Sum_{n>=0} x^n / Product_{k=0..n} (1 - k*x + x^2). - Paul D. Hanna, Sep 03 2017
Comments