OFFSET
0,4
COMMENTS
a(n) = A184174(n,0).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..550
FORMULA
a(n) = Sum((-1)^j*binomial(n-j,j)*bell(n-2j,j), 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
EXAMPLE
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)
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Feb 09 2011
STATUS
approved