Let $a_{j,k}$ be the number of strings of length $k$, formed from an alphabet of size $n$, such that the $i$th character in the alphabet appears $i+jn$ times in the string.
For example, if $n=3,k=15,j=1$ and the three characters of the alphabet are $a,b,c$ then one such string is $aaaabbbbbcccccc$ and $a_{1,15}$ is the number of rearrangements of this string.
I am trying to find a generating function for the $a_{j,k}$.
Clearly, if $k\ne \sum_{1\le i\le n}(i+jn)$ then $a_{j,k}=0$
I am aware that the general function to generate $n$ elements is $G(x) = (1+x)^{n}$ derived from the binomial theorem.
I have already looked at this post and thought that I could simply plug $j$ into the function:
$G(x) = (x^{1+jn} + x^{2+jn}+...+x^{k})(x^{2+jn} + x^{3+jn}+...+x^{k})...(x^{n+jn} + x^{n+jn+1}+...+x^{k})$
I am unsure as to whether the above function is mathematically correct since I do not fully understand the steps to create a generating function which takes into account this condition.
How would you create a generating function that would satisfy the condition that the $i^{th}$ element must appear $i + jn$ times, assuming $1 ≤ i ≤ n$ and $j \geq 0$? What are the steps in creating this function?