OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (1, 2, -1, -2, 0, 1, -1, 0, 2, 1, -2, -1, 1).
FORMULA
G.f.: (-1 - x + 3*x^2 + 2*x^3 - 3*x^4 - 4*x^5 - 2*x^7 - 4*x^8 + 3*x^10 - 2*x^11 - 4*x^12 + x^14)/( (-1+x)^5*(1+x)^2*(1+x+x^2)*(1+x+x^2+x^3+x^4) ).
EXAMPLE
a(5)=6: The aperiodic necklaces are BWWWW, BBWWW, BWBWW, BBBWW, BBWBW, BBBBW.
MATHEMATICA
(* The g.f. for the number of aperiodic necklaces (Lyndon words) with k<=m black beads and n-k white beads is *)
gf[x_, m_]:=Sum[x^i/i Plus@@(MoebiusMu[#](1-x^#)^(-(i/#))&/@Divisors[i]), {i, 1, m}]+x+1
(* Here we have the case m=5 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Herbert Kociemba, Oct 24 2016
STATUS
approved