login
Number of partitions of [3n] into n sets of size 3 avoiding any set {3j-2,3j-1,3j} (1<=j<=n).
4

%I #16 Feb 17 2024 14:28:05

%S 1,0,9,252,14337,1327104,182407545,34906943196,8877242235393,

%T 2896378850249568,1179516253790272041,586470881874514605660,

%U 349649630741370155550849,246214807676005971547223712,202182156277565590613022234777,191496746966087534845272710637564

%N Number of partitions of [3n] into n sets of size 3 avoiding any set {3j-2,3j-1,3j} (1<=j<=n).

%H Alois P. Heinz, <a href="/A370357/b370357.txt">Table of n, a(n) for n = 0..223</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_of_a_set">Partition of a set</a>

%F a(n) = Sum_{j=0..n} (-1)^(n-j) * binomial(n,j) * A025035(j).

%F a(n) = A025035(n) - A370358(n).

%F a(n) mod 9 = A000007(n).

%F a(n) mod 2 = A059841(n).

%e a(0) = 1: the empty partition satisfies the condition.

%e a(1) = 0: 123 is not counted.

%e a(2) = 9: 124|356, 125|346, 126|345, 134|256, 135|246, 136|245, 145|236, 146|235, 156|234 are counted. 123|456 is not counted.

%p a:= proc(n) option remember; `if`(n<3, [1, 0, 9][n+1],

%p 9*(n*(n-1)/2*a(n-1)+(n-1)^2*a(n-2)+(n-1)*(n-2)/2*a(n-3)))

%p end:

%p seq(a(n), n=0..20);

%Y Column k=0 of A370347.

%Y Column k=3 of A370366.

%Y Cf. A000007, A025035, A059841, A370358.

%K nonn

%O 0,3

%A _Alois P. Heinz_, Feb 16 2024