A305008 Triangle read by rows of coefficients for functions and generating functions for the number of achiral color patterns (set partitions) for a row or loop of varying length using exactly n colors (sets).
1, 1, 1, 1, 1, 0, 1, 2, -1, -2, 1, 2, -1, -4, -2, 1, 3, -3, -11, 0, 6, 1, 3, -3, -17, -8, 20, 16, 1, 4, -6, -32, 1, 64, 20, -20, 1, 4, -6, -44, -19, 140, 136, -120, -132, 1, 5, -10, -70, 5, 301, 152, -396, -280, 28, 1, 5, -10, -90, -35, 541, 608, -1228, -1752, 800, 1216, 1, 6, -15, -130, 15, 966, 643, -2798
Offset: 0
Examples
Triangle begins: 1; 1, 1; 1, 1, 0; 1, 2, -1, -2; 1, 2, -1, -4, -2; 1, 3, -3, -11, 0, 6; 1, 3, -3, -17, -8, 20, 16; 1, 4, -6, -32, 1, 64, 20, -20; 1, 4, -6, -44, -19, 140, 136, -120, -132; 1, 5, -10, -70, 5, 301, 152, -396, -280, 28; 1, 5, -10, -90, -35, 541, 608, -1228, -1752, 800, 1216; 1, 6, -15, -130, 15, 966, 643, -2798, -3028, 2236, 3600, 936;
Crossrefs
Programs
-
Mathematica
Coef[n_, -1] := Coef[n, -1] = 0; Coef[n_, 0] := Coef[n, 0] = Boole[n>=0]; Coef[n_, k_] := Coef[n, k] = If[k > n, 0, Coef[n-1, k-1] + Coef[n-2, k] - (n-1) Coef[n-2, k-2]] Table[Coef[n, k], {n, 0, 30}, {k, 0, n}] // Flatten
Formula
T(n,k) = [1 <= k <= n] * (T(n-1, k-1) + T(n-2, k) - (n-1) * T(n-2, k-2)) + [k==0 & n>=0].
Comments