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.

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.

Original entry on oeis.org

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

Views

Author

R. J. Mathar, Nov 05 2021

Keywords

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.

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).
		

Crossrefs

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

Formula

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

Extensions

Terms corrected and extended by Andrew Howroyd, Jan 14 2023