6-ary Lyndon words with given trace and subtrace

A $k$-ary Lyndon word is a string made from the characters $\{0,1,\ldots,k-1\}$. It must be aperiodic (not equal to any of its non-trivial rotations) and be lexicographically least among its rotations. Here we consider the number $L(n;t,s)$ of length $n$ Lyndon words $a_1 a_2 \ldots a_n$ over the alphabet $\{0,1,\ldots,k-1\}$ with $k=6$ that have trace $t$ and subtrace $s$. The trace of a Lyndon word is the sum of its digits mod $k$, i.e., $t = a_1 + a_2 + \cdots + a_n \pmod{k}$. The subtrace is the sum of the products of all $n(n-1)/2$ pairs of digits taken mod $k$, i.e., $s=\sum_{1\leq i\lt j\leq n} a_i a_j$.

(trace,subtrace)
n (0,0) (0,1) (0,2) (0,3) (0,4) (0,5) (1,0)
(5,0)
(1,1)
(5,1)
(1,2)
(5,2)
(1,3)
(5,3)
(1,4)
(5,4)
(1,5)
(5,5)
(2,0)
(4,0)
(2,1)
(4,1)
(2,2)
(4,2)
(2,3)
(4,3)
(2,4)
(4,4)
(2,5)
(4,5)
(3,0) (3,1) (3,2) (3,3) (3,4) (3,5)
1 100 000 100 000 100 000 100 000
2 001 001 200 010 100 100 102 000
3 002 306 313 131 131 313 306 002
4 486 13218 9612 9612 486 13218 9612 9612
5 256036 423660 364236 602560 364236 602560 256036 423660
6 165236240 165236240 162270162 270162270 214214214 214214214 126300180 207180300
7 115710081296 90012961008 90012961008 115710081296 115710081296 90012961008 90012961008 115710081296
8 655252806312 509467924908 561658326048 561658326048 631250946792 490865525280 583260485616 583260485616
9 330453024031824 291513427228080 330482916033048 291603304829160 330482916033048 291603304829160 330453024031824 291513427228080
10 167928169987165840 167928169987165840 178459159408176256 157464180662155520 167928169987165840 167928169987165840 178459159408176256 157464180662155520

Examples

The three 6-ary Lyndon words of trace 2, subtrace 1 and length 3 are $\{011, 134, 143\}$. The two 6-ary Lyndon words of trace 3, subtrace 5 and length 3 are $\{135, 153\}$. The six 6-ary Lyndon words of trace 5, subtrace 1 and length 4 are $\{0113, 0131, 0311, 1334, 1343, 1433\}$.

Enumeration (OEIS)