Strings over $GF(5)$ with given trace and subtrace

Here we consider the number $S(n;t,s)$ of length $n$ words $a_1 a_2 \ldots a_n$ over the alphabet consisting of the elements of the field $GF(5)$ that have trace $t$ and subtrace $s$. The trace of a 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(5) = \mathbb{Z}_5$.

(trace,subtrace)
$n$ (0,0) (0,1)
(0,4)
(0,2)
(0,3)
(1,0)
(2,0)
(3,0)
(4,0)
(1,1)
(2,4)
(3,4)
(4,1)
(1,2)
(2,3)
(3,3)
(4,2)
(1,3)
(2,2)
(3,2)
(4,3)
(1,4)
(2,1)
(3,1)
(4,4)
1 100 1 000 0
2 120 2 002 1
3 166 6 616 6
4 252030 20 252030 30
5 125100150 125 125125125 125
6 625600650 625 600650650 600
7 302531503150 3150 315031503150 3025
8 156251575015500 15500 157501562515750 15500
9 786257800078000 78000 786257800078000 78000
10 393125390000390000 390625 390625390625390625 390625

Examples

The two 5-ary strings of trace 0, subtrace 4 and length 2 are $\{14, 41\}$. The two 5-ary strings of trace 3, subtrace 2 and length 2 are $\{12, 21\}$. The one 5-ary string of trace 1, subtrace 2 and length 3 is $\{222\}$.

Enumeration (OEIS)