OFFSET
0,5
COMMENTS
Number of blocks not consisting of consecutive integers in all partitions of the set {1,2,...,n} (a singleton is considered a block of consecutive integers). Example: a(3)=1 because in 1-2-3, 1-23, 12-3, 13-2, and 123 only the block 13 does not consist of consecutive integers.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..500
FORMULA
MAPLE
with(combinat): a:= proc(n) add((binomial(n, j)-j-1)*bell(j), j = 0 .. n-1) end proc: seq(a(n), n = 0 .. 22);
MATHEMATICA
Table[Sum[(Binomial[n, j]-j-1)BellB[j], {j, 0, n-1}], {n, 0, 30}] (* Harvey P. Dale, Oct 15 2015 *)
PROG
(Magma)
A177257:= func< n | n eq 0 select 0 else (&+[(Binomial(n, j)-(j+1))*Bell(j): j in [0..n-1]]) >;
[A177257(n): n in [0..30]]; // G. C. Greubel, May 12 2024
(SageMath)
def A177257(n): return sum((binomial(n, j) -(j+1))*bell_number(j) for j in range(n))
[A177257(n) for n in range(31)] # G. C. Greubel, May 12 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, May 07 2010
STATUS
approved