A349002 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, 1, 0, 2, 6, 12, 34, 120, 354, 1082, 3636, 12270, 40708, 139062, 484866, 1692268, 5944470, 21134808, 75625330, 271720146, 982116648, 3569558058, 13025614962, 47714385708, 175470892468, 647508620070, 2396613522804, 8896422981608, 33114570409896, 123566641829256
Offset: 0
Keywords
Examples
Examples for the alphabet {0,1,2,3}: a(0)=1 counts (), the empty word. a(3)=2 counts (021) (012). a(4)=6 counts (0321) (0231) (0312) (0132) (0213) (0123). a(5)=12 counts (03321) (03231) (02331) (03312) (03132) (01332) (03213) (02313) (03123) (01323) (02133) (01233). 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).
Programs
-
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
Extensions
Terms corrected and extended by Andrew Howroyd, Jan 14 2023
Comments