%I #13 Aug 30 2024 11:38:10
%S 1,2,1,2,3,6,9,17,26,42,62,93,130,183,246,329,428,553,698,877,1082,
%T 1328,1608,1937,2307,2736,3215,3762,4369,5055,5810,6657,7584,8614,
%U 9737,10976,12320,13795,15388,17126,18997,21029,23208,25565,28085,30799,33694,36801,40105,43641,47392
%N Number of aperiodic necklaces (Lyndon words) with k<=5 black beads and n-k white beads.
%H <a href="/index/Rec#order_13">Index entries for linear recurrences with constant coefficients</a>, signature (1, 2, -1, -2, 0, 1, -1, 0, 2, 1, -2, -1, 1).
%F 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) ).
%e a(5)=6: The aperiodic necklaces are BWWWW, BBWWW, BWBWW, BBBWW, BBWBW, BBBBW.
%t (* The g.f. for the number of aperiodic necklaces (Lyndon words) with k<=m black beads and n-k white beads is *)
%t gf[x_, m_]:=Sum[x^i/i Plus@@(MoebiusMu[#](1-x^#)^(-(i/#))&/@Divisors[i]), {i, 1, m}]+x+1
%t (* Here we have the case m=5 *)
%Y Cf. A001037 (k arbitrary), A008747 (k<=3), A277619 (k<=4). Mathematica section of A032168 gives g.f. for k=m black beads and n-k white beads.
%K nonn,easy
%O 0,2
%A _Herbert Kociemba_, Oct 24 2016