OFFSET
0,2
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,2,-1,-2,-1,2,1,-1).
FORMULA
G.f.: (1+x-3*x^2-2*x^3+3*x^4+5*x^5-3*x^7+x^9)/((-1+x)^4*(1+x)^2*(1+x+x^2)).
a(n) = a(n-1)+2*a(n-2)-a(n-3)-2*a(n-4)-a(n-5)+2*a(n-6)+a(n-7)-a(n-8) for n>7. - Colin Barker, Oct 29 2016
EXAMPLE
a(6)=8. The aperiodic necklaces are BWWWWW, BBWWWW, BWBWWW, BBBWWW, BBWBWW, BBWWBW, BBBBWW, and BBBWBW.
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=4 *)
PROG
(PARI) Vec((1+x-3*x^2-2*x^3+3*x^4+5*x^5-3*x^7+x^9)/((-1+x)^4*(1+x)^2*(1+x+x^2)) + O(x^60)) \\ Colin Barker, Oct 29 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Herbert Kociemba, Oct 24 2016
STATUS
approved