OFFSET
0,8
COMMENTS
Two color patterns are equivalent if we permute the colors. Achiral color patterns must be equivalent if we reverse the order of the pattern.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,16,-16,-91,91,216,-216,-180, 180).
FORMULA
a(n) = [n==0 mod 2] * (S2(n/2+3, 6) - 3*S2(n/2+2, 6) - 8*S2(n/2+1, 6) + 16*S2(n/2, 6)) + [n==1 mod 2] * (3*S2((n+5)/2, 6) - 17*S2((n+3)/2, 6) + 20*S2((n+1)/2, 6 )) where S2(n,k) is the Stirling subset number A008277(n,k).
G.f.: x^6 *(1+x)*(1-4*x^2)*(1+2*x-x^2-4*x^3) / Product_{k=1..6} (1 - k*x^2).
a(n) = A304972(n,6).
a(2m-1) = A140735(m,6).
a(2m) = A293181(m,6).
EXAMPLE
For a(7) = 3, the color patterns for both rows and loops are ABCDCEF, ABCDEBF, and ABCDEFA.
MATHEMATICA
Table[If[EvenQ[n], StirlingS2[n/2 + 3, 6] - 3 StirlingS2[n/2 + 2, 6] - 8 StirlingS2[n/2 + 1, 6] + 16 StirlingS2[n/2, 6], 3 StirlingS2[(n + 5)/2, 6] - 17 StirlingS2[(n + 3)/2, 6] + 20 StirlingS2[(n + 1)/2, 6]], {n, 0, 40}]
Join[{0}, LinearRecurrence[{1, 16, -16, -91, 91, 216, -216, -180, 180}, {0, 0, 0, 0, 0, 1, 3, 18, 46}, 40]] (* Robert A. Russell, Oct 14 2018 *)
CoefficientList[Series[x^6 *(1+x)*(1-4*x^2)*(1+2*x-x^2-4*x^3) / Product[1 - k*x^2, {k, 1, 6}], {x, 0, 50}], x] (* Stefano Spezia, Oct 20 2018 *)
PROG
(PARI) m=40; v=concat([0, 0, 0, 0, 0, 1, 3, 18, 46], vector(m-9)); for(n=10, m, v[n] = v[n-1] +16*v[n-2] -16*v[n-3] -91*v[n-4] +91*v[n-5] +216*v[n-6] -216*v[n-7] -180*v[n-8] +180*v[n-9]); concat([0], v) \\ G. C. Greubel, Oct 16 2018
(Magma) I:=[0, 0, 0, 0, 0, 1, 3, 18, 46]; [0] cat [n le 9 select I[n] else Self(n-1) +16*Self(n-2) -16*Self(n-3) -91*Self(n-4) +91*Self(n-5) +216*Self(n-6) -216*Self(n-7) -180*Self(n-8) +180*Self(n-9): n in [1..40]]; // G. C. Greubel, Oct 16 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Robert A. Russell, May 22 2018
STATUS
approved