Lyndon words over $GF(3)$ with given trace and subtrace

Here we consider the number $L(n;t,s)$ of length $n$ Lyndon words $a_1 a_2 \ldots a_n$ over the alphabet consisting of the elements of the field $GF(3)$ that have trace $t$ and subtrace $s$. The trace of a Lyndon word is the sum of its digits over the field, i.e., $t = a_1 + a_2 + \cdots + a_n$. The subtrace is the sum of the products of all $n(n-1)/2$ pairs of digits taken over the field, i.e., $s=\sum_{1\leq i\lt j\leq n} a_i a_j$. Note that $GF(3)=\mathbb{Z}_3$.

(trace,subtrace)
$n$ (0,0) (0,1) (0,2) (1,0)
(2,0)
(1,1)
(2,1)
(1,2)
(2,2)
1 100 100
2 001 100
3 002 111
4 213 213
5 466 646
6 91415 131313
7 323636 323636
8 909387 879093
9 240252234 243243243
10 654661645 654661645
11 180417821782 178218041782
12 495048934893 491449144914
13 136641360813608 136641360813608
14 379443789037994 379943794437890
15 106272106142106434 106288106288106288
16 298890298755299025 298890298755299025
17 843796844182844182 844182843796844182
18 239059523917322391723 239136323913632391363
19 679616067971966797196 679616067971966797196
20 193706961937168419369708 193697081937069619371684

Examples

The two ternary Lyndon words of trace 0, subtrace 0 and length 4 are $\{0111, 0222\}$. The three ternary Lyndon words of trace 1, subtrace 2 and length 4 are $\{0112, 0121, 0211\}$. The six ternary Lyndon words of trace 2, subtrace 2 and length 5 are $\{00122, 00212, 00221, 01022, 01202, 02021\}$.

Enumeration (OEIS)