|
|
A320095
|
|
Number of primitive (=aperiodic) n-ary words with length less than or equal to n which are earlier in lexicographic order than any other word derived by cyclic shifts of the alphabet.
|
|
3
|
|
|
1, 2, 11, 79, 773, 9281, 137191, 2396150, 48426649, 1111099879, 28531150811, 810554312866, 25239591811405, 854769747700454, 31278135014945519, 1229782937960902111, 51702516367459973873, 2314494592652832016030, 109912203092221714132219, 5518821052631039996623577
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = Sum_{j=1..n} Sum_{d|j} n^(d-1) * mu(j/d).
a(n) = [x^n] (1/(1 - x)) * Sum_{k>=1} mu(k) * x^k / (1 - n*x^k). - Ilya Gutkovskiy, Feb 16 2020
|
|
MAPLE
|
b:= (n, k)-> add(`if`(d=n, k^(n-1), -b(d, k)), d=numtheory[divisors](n)):
g:= proc(n, k) option remember; b(n, k)+`if`(n<2, 0, g(n-1, k)) end:
a:= n-> g(n$2):
seq(a(n), n=1..23);
|
|
MATHEMATICA
|
a[n_] := Sum[n^(d-1)*MoebiusMu[j/d], {j, 1, n}, {d, Divisors[j]}];
|
|
PROG
|
(PARI) a(n) = sum(j=1, n, sumdiv(j, d, n^(d-1) * moebius(j/d))); \\ Michel Marcus, Feb 16 2020
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|