A075147 Number of Lyndon words (aperiodic necklaces) with n beads of n colors.
1, 1, 8, 60, 624, 7735, 117648, 2096640, 43046640, 999989991, 25937424600, 743008120140, 23298085122480, 793714765724595, 29192926025339776, 1152921504338411520, 48661191875666868480, 2185911559727674682148, 104127350297911241532840, 5242879999999487999992020
Offset: 1
Keywords
Links
Programs
-
Maple
with(numtheory): a:= n-> add(n^d *mobius(n/d), d=divisors(n))/n: seq(a(n), n=1..25); # Alois P. Heinz, Dec 21 2014
-
Mathematica
Table[Total@Map[ MoebiusMu[#1] n^(n/#1 - 1) &, Divisors[n]], {n, 20}] (* Olivier Gérard, Aug 05 2016 *)
-
PARI
a(n) = sumdiv(n, d, moebius(n/d) * n^d) / n; \\ Amiram Eldar, May 29 2025
Formula
a(n) = (1/n) * Sum_{d|n} mu(n/d)*n^d.
Asymptotic to n^(n-1) = A000169(n).
a(n) is the n-th term of the inverse Euler transform of j-> n^j. - Alois P. Heinz, Jun 23 2018
a(n) = [x^n] Sum_{k>=1} mu(k)*log(1/(1 - n*x^k))/k. - Ilya Gutkovskiy, May 20 2019