OFFSET
1,4
FORMULA
a(n) = -(k!/4)*(S2(floor((n+1)/2),k) + S2(ceiling((n+1)/2),k)) + (k!/(2n))*Sum_{d|n} phi(d)*S2(n/d,k), with k=3 different colors used and where S2(n,k) is the Stirling subset number A008277.
a(n) = A305541(n,3).
G.f.: -(3/2) * x^4 * (1+x)^2 / Product_{j=1..3} (1-j*x^2) - Sum_{d>0} (phi(d)/(2d)) * (log(1-3x^d) - 3*log(1-2x^d) + 3*log(1-x^d)).
EXAMPLE
For a(4)=3, the chiral pairs of color loops are AABC-AACB, ABBC-ACBB, and ABCC-ACCB.
MATHEMATICA
k=3; Table[(k!/(2n)) DivisorSum[n, EulerPhi[#] StirlingS2[n/#, k] &] - (k!/4) (StirlingS2[Floor[(n+1)/2], k] + StirlingS2[Ceiling[(n+1)/2], k]), {n, 1, 40}]
PROG
(PARI) a(n) = my(k=3); -(k!/4)*(stirling(floor((n+1)/2), k, 2) + stirling(ceil((n+1)/2), k, 2)) + (k!/(2*n))*sumdiv(n, d, eulerphi(d)*stirling(n/d, k, 2)); \\ Michel Marcus, Jun 06 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Robert A. Russell, Jun 04 2018
STATUS
approved