login
The number of Lyndon words of size n from an alphabet of 4 letters and 1st, 2nd and 3rd letter of the alphabet with equal frequency in the words.
1

%I #13 Jan 14 2023 17:24:28

%S 1,1,0,2,6,12,34,120,354,1082,3636,12270,40708,139062,484866,1692268,

%T 5944470,21134808,75625330,271720146,982116648,3569558058,13025614962,

%U 47714385708,175470892468,647508620070,2396613522804,8896422981608,33114570409896,123566641829256

%N The number of Lyndon words of size n from an alphabet of 4 letters and 1st, 2nd and 3rd letter of the alphabet with equal frequency in the words.

%C Counts a subset of the Lyndon words in A027377. Here there is no requirement of how often the 4th letter of the alphabet occurs in the admitted word, only on the frequency of the 1st to 3rd letter of the alphabet.

%H <a href="/index/Lu#Lyndon">Index entries for sequences related to Lyndon words</a>

%F n*a(n) = Sum_{d|n} mu(d)*A344560(n/d) where mu = A008683.

%e Examples for the alphabet {0,1,2,3}:

%e a(0)=1 counts (), the empty word.

%e a(3)=2 counts (021) (012).

%e a(4)=6 counts (0321) (0231) (0312) (0132) (0213) (0123).

%e a(5)=12 counts (03321) (03231) (02331) (03312) (03132) (01332) (03213) (02313) (03123) (01323) (02133) (01233).

%e a(6)=34 counts (020211) (002211) (012021) (002121) (010221) (001221) (033321) (033231) (032331) (023331) (012102) (011202) (002112) (010212) (001212) (033312) (011022) (010122) (001122) (033132) (031332) (013332) (033213) (032313) (023313) (033123) (031323) (013323) (032133) (023133) (031233) (013233) (021333) (012333).

%o (PARI) a(n) = if(n>0, sumdiv(n, d, moebius(n/d)*sum(k=0, d\3, d!/(k!^3*(d-3*k)!)))/n, n==0) \\ _Andrew Howroyd_, Jan 14 2023

%Y Cf. A027377, A060165, A344560.

%K nonn

%O 0,4

%A _R. J. Mathar_, Nov 05 2021

%E Terms corrected and extended by _Andrew Howroyd_, Jan 14 2023