OFFSET
0,4
COMMENTS
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.
EXAMPLE
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).
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
R. J. Mathar, Nov 05 2021
EXTENSIONS
Terms corrected and extended by Andrew Howroyd, Jan 14 2023
STATUS
approved
