OFFSET
0,2
COMMENTS
Counts a subset of the Lyndon words in A001692. Here there is no requirement of how often the 3rd to 5th letter of the alphabet are in the admitted word, only on the frequency of the 1st and 2nd letter of the alphabet.
Let T(n,k,M) be the number of words of length n drawn from an alphabet of size M where the first k letters of the alphabet appear with the same frequency f in each word. Then T(n,k,M) = Sum_{f=0..floor(n/k)) (M-k)^(n-f*k) * Product_{i=0..k-1} binomial(n-i*f,f) and T(n,2,5) = A026375(n), T(n,3,6) = A294035(n), T(n,2,6)= A081671(n). Removing the words with cycles by the inclusion-exclusion principle by a Mobius Transform gives words of length n of that type without cycles and division through n the Lyndon words of that type. - R. J. Mathar, Nov 07 2021
LINKS
EXAMPLE
Examples for the alphabet {0,1,2,3,4}:
a(0)=1 counts (), the empty word.
a(3)=14 counts (021) (031) (041) (012) (013) (223) (233) (243) (014) (224) (234) (334) (244) (344), words of length 3 where the letters 0 and the 1 occur both either not or once.
a(4)=46 counts (0011) (0221) (0321) (0421) (0231) (0331) (0431) (0241) (0341) (0441) (0212) (0312) (0412) (0122) (0132) (0142) (0213) (0313) (0413) (0123) (2223) (0133) (2233) (2333) (2433) (0143) (2243) (2343) (2443) (0214) (0314) (0414) (0124) (2224) (2324) (0134) (2234) (2334) (3334) (2434) (0144) (2244) (2344) (3344) (2444) (3444).
PROG
(PARI) a(n) = if(n>0, sumdiv(n, d, moebius(n/d)*sum(k=0, d, binomial(d, k)*binomial(2*k, k)))/n, n==0) \\ Andrew Howroyd, Jan 14 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
R. J. Mathar, Nov 05 2021
EXTENSIONS
Terms a(16) and beyond from Andrew Howroyd, Jan 14 2023
STATUS
approved