OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..350
FORMULA
EXAMPLE
a(3) = 24 because there are 24 primitive words of length 3 over 3-letter alphabet {a,b,c}: aab, aac, aba, abb, abc, aca, acb, acc, baa, bab, bac, bba, bbc, bca, bcb, bcc, caa, cab, cac, cba, cbb, cbc, cca, ccb.
MAPLE
with(numtheory):
a:= n-> add(n^d *mobius(n/d), d=divisors(n)):
seq(a(n), n=1..25);
MATHEMATICA
a[n_] := DivisorSum[n, n^# * MoebiusMu[n/#]& ];
Array[a, 25] (* Jean-François Alcover, Mar 24 2017, translated from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Dec 21 2014
STATUS
approved