OFFSET
1,4
COMMENTS
LINKS
Index entries for linear recurrences with constant coefficients, signature (4,4,-16).
FORMULA
a(n) = Sum_{j=1..k} (S2(n,j) - Ach(n,j)) / 2, where k=4 is the maximum number of colors, S2 is the Stirling subset number A008277, and Ach(n,k) = [n>=0 & n<2 & n==k] + [n>1]*(k*Ach(n-2,k) + Ach(n-2,k-1) + Ach(n-2,k-2)).
a(2*m) = (16^m - 4*4^m)/48.
a(2*m-1) = (16^m - 4*4^m)/192.
a(n) = (4^n - 4^floor(n/2+1))/48.
G.f.: x^2/((-1 + 4*x)*(-1 + 4*x^2)). - Stefano Spezia, Oct 29 2018
a(n) = 2^n*(2^n - (-1)^n - 3)/48. - Bruno Berselli, Oct 31 2018
EXAMPLE
For a(4)=4, the chiral pairs are AAAB-ABBB, AABA-ABAA, AABC-ABCC, and ABAC-ABCB.
MATHEMATICA
Table[(4^n - 4^Floor[n/2+1])/48, {n, 40}] (* or *)
LinearRecurrence[{4, 4, -16}, {0, 0, 1}, 40] (* or *)
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[Sum[StirlingS2[n, j]-Ach[n, j], {j, k}]/2, {n, 40}]
CoefficientList[Series[x^2/((-1 + 4 x) (-1 + 4 x^2)), {x, 0, 50}], x] (* Stefano Spezia, Oct 29 2018 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Robert A. Russell, Oct 27 2018
STATUS
approved