OFFSET
0,9
COMMENTS
Number of chiral pairs of set partitions of a cycle of n elements using exactly two different elements. - Robert A. Russell, Oct 02 2018
LINKS
FORMULA
From Robert A. Russell, Oct 02 2018: (Start)
a(n) = -S2(1+floor(n/2),2) + (1/2n) * Sum_{d|n} phi(d) * S2(n/d+[2|d],2), where S2 is a Stirling subset number A008277.
G.f.: -x(1+2x)/(2-4x^2) - Sum_{d>0} phi(d) * log(1-2x^d) / (2d*(2-[2|d])).
(End)
EXAMPLE
For a(7) = 1, the chiral pair is AAABABB-AAABBAB.
For a(8) = 2, the chiral pairs are AAAABABB-AAAABBAB and AAABAABB-AAABBAAB.
MATHEMATICA
Prepend[Table[DivisorSum[n, EulerPhi[#] StirlingS2[n/# + If[Divisible[#, 2], 1, 0], 2] &] / (2n) - StirlingS2[1+Floor[n/2], 2] / 2, {n, 1, 40}], 0] (* Robert A. Russell, Oct 02 2018 *)
PROG
(PARI) a(n) = {if(n<1, 0, (sumdiv(n, k, eulerphi(2*k) * 2^(n/k)) / (2*n) - 2^(n\2))/2)}; \\ Andrew Howroyd, Nov 03 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Henry Bottomley, Dec 21 2000
EXTENSIONS
Name clarified by Robert A. Russell, Oct 02 2018
STATUS
approved