OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..578
Wikipedia, Partition of a set
EXAMPLE
a(6) = 178 = 203 - 25 counts all partitions of [6] with the exception of 123|456, 124|356, 125|346, 126|345, 12|34|56, 12|35|46, 12|36|45, 134|256, 135|246, 136|245, 13|24|56, 13|25|46, 13|26|45, 145|236, 146|235, 14|23|56, 156|234, 15|23|46, 16|23|45, 14|25|36, 14|26|35, 15|24|36, 16|24|35, 15|26|34, 16|25|34.
MAPLE
b:= proc(n, i) option remember; `if`(n=0 or i=1, 1, add(
`if`(irem(j, i)=0 or irem(i, j)=0, b(n-i*j, i-1)/j!*
combinat[multinomial](n, i$j, n-i*j), 0), j=0..n/i))
end:
a:= n-> b(n$2):
seq(a(n), n=0..25);
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 04 2024
STATUS
approved