OFFSET
1,5
COMMENTS
Two color patterns are equivalent if we permute the colors. Chiral color patterns must not be equivalent if we reverse the order of the pattern.
LINKS
Index entries for linear recurrences with constant coefficients, signature (8, -12, -44, 121, 12, -228, 144).
FORMULA
a(n) = (S2(n,k) - A(n,k))/2, where k=4 is the number of colors (sets), S2 is the Stirling subset number A008277 and A(n,k) = [n>1] * (k*A(n-2,k) + A(n-2,k-1) + A(n-2,k-2)) + [n<2 & n==k & n>=0].
G.f.: (x^4 / Product_{k=1..4} (1 - k*x) - x^4*(1 + x)^2*(1 - 2 x^2) / Product_{k=1..4} (1 - k*x^2)) / 2.
EXAMPLE
For a(5)=4, the chiral pairs are AABCD-ABCDD, ABACD-ABCDC, ABBCD-ABCCD and ABCAD-ABCDB.
MATHEMATICA
k=4; Table[(StirlingS2[n, k] - If[EvenQ[n], StirlingS2[n/2+2, 4] - StirlingS2[n/2+1, 4] - 2StirlingS2[n/2, 4], 2StirlingS2[(n+3)/2, 4] - 4StirlingS2[(n+1)/2, 4]])/2, {n, 30}]
Ach[n_, k_] := Ach[n, k] = If[n<2, Boole[n==k && n>=0], k Ach[n-2, k] + Ach[n-2, k-1] + Ach[n-2, k-2]] (* A304972 *)
k = 4; Table[(StirlingS2[n, k] - Ach[n, k])/2, {n, 1, 30}]
LinearRecurrence[{8, -12, -44, 121, 12, -228, 144}, {0, 0, 0, 0, 4, 28, 167}, 30]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Robert A. Russell, Oct 14 2018
STATUS
approved