cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A320095 #17 Oct 25 2022 08:32:13
%S A320095 1,2,11,79,773,9281,137191,2396150,48426649,1111099879,28531150811,
%T A320095 810554312866,25239591811405,854769747700454,31278135014945519,
%U A320095 1229782937960902111,51702516367459973873,2314494592652832016030,109912203092221714132219,5518821052631039996623577
%N 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.
%H A320095 Alois P. Heinz, <a href="/A320095/b320095.txt">Table of n, a(n) for n = 1..387</a>
%F A320095 a(n) = Sum_{j=1..n} Sum_{d|j} n^(d-1) * mu(j/d).
%F A320095 a(n) = A143327(n,n).
%F A320095 a(n) = Sum_{j=1..n} A143325(j,n).
%F A320095 a(n) = A143326(n,n) / n.
%F A320095 a(n) = [x^n] (1/(1 - x)) * Sum_{k>=1} mu(k) * x^k / (1 - n*x^k). - _Ilya Gutkovskiy_, Feb 16 2020
%p A320095 b:= (n, k)-> add(`if`(d=n, k^(n-1), -b(d, k)), d=numtheory[divisors](n)):
%p A320095 g:= proc(n, k) option remember; b(n, k)+`if`(n<2, 0, g(n-1, k)) end:
%p A320095 a:= n-> g(n$2):
%p A320095 seq(a(n), n=1..23);
%t A320095 a[n_] := Sum[n^(d-1)*MoebiusMu[j/d], {j, 1, n}, {d, Divisors[j]}];
%t A320095 Table[a[n], {n, 1, 20}] (* _Jean-François Alcover_, Oct 25 2022, after A143327 *)
%o A320095 (PARI) a(n) = sum(j=1, n, sumdiv(j, d, n^(d-1) * moebius(j/d))); \\ _Michel Marcus_, Feb 16 2020
%Y A320095 Main diagonal of A143327.
%Y A320095 Cf. A143325, A143326.
%K A320095 nonn
%O A320095 1,2
%A A320095 _Alois P. Heinz_, Oct 05 2018