OFFSET
0,4
LINKS
Alois P. Heinz, Rows n = 0..81, flattened
T. Pfaff and J. Walker, The Chromatic Polynomial of P_2 X P_n and C_3 X P_n, Missouri J. Math. Sci., 20, Issue 3 (2008), 169-177.
FORMULA
CP(n,i) = CP(n-1,i) +3*CP(n-1,i-1) +5*CP(n-1,i-2) +4*CP(n-1,i-3), with CP(0,0) = CP(0,1) = 1; n>=0 and 3n+1 >= i >= 0.
EXAMPLE
The chromatic polynomial of C_3 X P_2 is: x(x-1)^5 -4*x(x-1)^4 +8*x(x-1)^3 -9*x(x-1)^2 +4*x(x-1)^1 and so CP(1,0) = 1, CP(1,1) = 4, CP(1,2) = 8, CP(1,3) = 9 and CP(1,4) = 4.
Triangle begins:
1, 1;
1, 4, 8, 9, 4;
1, 7, 25, 57, 87, 89, 56, 16;
1, 10, 51, 171, 411, 735, 986, 977, 684, 304, 64;
1, 13, 86, 378, 1219, 3027, 5930, 9254, 11485, 11185, 8304, 4448, 1536, 256;
MAPLE
CP:= proc(n, i) option remember;
`if`(n=0 and (i=0 or i=1), 1, `if`(n<0 or i<0, 0,
CP(n-1, i) +3*CP(n-1, i-1) +5*CP(n-1, i-2) +4*CP(n-1, i-3)))
end:
seq(seq(CP(n, i), i=0..3*n+1), n=0..6); # Alois P. Heinz, Apr 30 2012
MATHEMATICA
CP[0, 0] = CP[0, 1] = 1;
CP[n_ /; n >= 0, i_] /; 0 <= i <= 3n+1 := CP[n, i] =
CP[n-1, i] + 3 CP[n-1, i-1] + 5 CP[n-1, i-2] + 4 CP[n-1, i-3];
CP[_, _] = 0;
Table[CP[n, i], {n, 0, 6}, {i, 0, 3n+1}] // Flatten (* Jean-François Alcover, Feb 14 2021 *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Thomas J. Pfaff (tpfaff(AT)ithaca.edu), Oct 02 2006
EXTENSIONS
Corrected and extended by Alois P. Heinz, Apr 30 2012
STATUS
approved