This appears to be an interesting problem that can be attacked using
Power Group Enumeration on sets as described in quite some detail
at the following
MSE link.
That link discusses the number of different subsets of a standard $52$
card deck under suit permutation. Here we have the group permuting the
slots into which we distribute the cards is the symmetric group and
the group permuting cards is the cardinality twenty-four induced
action on the cards of all permutations of the four suits.
The lottery ticket problem proposed here follows exactly the same
model, only now we are distributing tickets into the slots being
permuted by the symmetric group and the group acting on the tickets is
the induced action of the symmetric group $S_N.$ The number of terms
in the cycle indices $Z(S_N)$ and $Z(S_T)$ is given by the [partition
function](https://oeis.org/A000041) and we get an algorithm that is of
[asymptotically lower order](https://en.wikipedia.org/wiki/Partition_%28number_theory%29#Approximation_formulas) than the naive $N!\times T!.$
The only non-trivial issue that is not already featured in the
solution to the distributions of cards is how to compute the cycle
index of the induced action of $S_N$ on the ${N\choose Q}$ tickets of
$Q$ elements. This can be done quite effectively by computing a
representative of the permutation shape from the cycle index of the symmetric group, letting it act on the tickets, and factoring the result into cycles for a contribution to the desired cycle index.
Setting $Q=5$ as in the question we obtain for $N=7$ the sequence
$$1, 2, 5, 10, 21, 41, 65, 97, 131, 148, 148, 131,\ldots$$
for $N=8$ the sequence
$$1, 3, 11, 52, 252, 1413, 7812, 41868, 207277, 936130, 3826031,\\
14162479,\ldots$$
for $N=9$ the sequence
$$1, 4, 20, 155, 1596, 20528, 282246, 3791710, 47414089, 542507784,\\
5659823776,53953771138,\ldots$$
and finally for $N=10$ the sequence
$$1, 5, 28, 324, 5750, 142148, 3937487, 108469019, 2804300907,\\
66692193996,1452745413957, 29041307854703,\ldots.$$
To illustrate the good complexity of this algorithm here is the
sequence for $N=13:$
$$1, 5, 42, 813, 34871, 2777978, 304948971, 37734074019,\\
4719535940546, 566299855228261, 63733180893169422,\\
6674324951638852138,\ldots$$
Finally we obtain for $N$ variable with $Q=5$ and $T=3$ the sequence
$$0, 0, 0, 0, 0, 1, 5, 11, 20, 28, 35, 39, 42, 43,\\
44, 44, 44, 44,\ldots$$
The Maple code to compute these was as follows:
with(combinat);
with(numtheory);
pet_flatten_term :=
proc(varp)
local terml, d, cf, v;
terml := [];
cf := varp;
for v in indets(varp) do
d := degree(varp, v);
terml := [op(terml), seq(v, k=1..d)];
cf := cf/v^d;
od;
[cf, terml];
end;
pet_autom2cycles :=
proc(src, aut)
local numa, numsubs;
local marks, pos, cycs, cpos, clen;
numsubs := [seq(src[k]=k, k=1..nops(src))];
numa := subs(numsubs, aut);
marks := Array([seq(true, pos=1..nops(aut))]);
cycs := []; pos := 1;
while pos <= nops(aut) do
if marks[pos] then
clen := 0; cpos := pos;
while marks[cpos] do
marks[cpos] := false;
cpos := numa[cpos];
clen := clen+1;
od;
cycs := [op(cycs), clen];
fi;
pos := pos+1;
od;
return mul(a[cycs[k]], k=1..nops(cycs));
end;
pet_cycleind_symm :=
proc(n)
local l;
option remember;
if n=0 then return 1; fi;
expand(1/n*add(a[l]*pet_cycleind_symm(n-l), l=1..n));
end;
pet_flat2rep :=
proc(f)
local p, q, res, t, len;
q := 1; res := [];
for t in f do
len := op(1, t);
res := [op(res), seq(p, p=q+1..q+len-1), q];
q := q+len;
od;
res;
end;
pet_cycleind_tickets :=
proc(N, Q)
option remember;
local cind, tickets, q, term, rep, subsl, ptickets,
idx, flat;
if N=1 then
idx := [a[1]]
else
idx := pet_cycleind_symm(N);
fi;
cind := 0;
tickets := convert(choose({seq(q, q=1..N)}, Q), `list`);
for term in idx do
flat := pet_flatten_term(term);
rep := pet_flat2rep(flat[2]);
subsl := [seq(q=rep[q], q=1..N)];
ptickets := subs(subsl, tickets);
cind := cind +
flat[1]*pet_autom2cycles(tickets, ptickets);
od;
cind;
end;
X :=
proc(N, Q, T)
option remember;
local idx_slots, idx_cols, res, term_a, term_b,
v_a, inst_a, inst_b, len_a, p;
if N = 0 then return 1 fi;
if T = 1 then
idx_slots := [a[1]];
else
idx_slots := pet_cycleind_symm(T);
fi;
idx_cols := pet_cycleind_tickets(N, Q);
res := 0;
for term_a in idx_slots do
for term_b in idx_cols do
p := 1;
for v_a in indets(term_a) do
len_a := op(1, v_a);
inst_a := degree(term_a, v_a);
inst_b := degree(term_b, v_a);
if inst_b >= inst_a then
p := p*binomial(inst_b, inst_a)
*inst_a!*len_a^inst_a;
else
p := 0;
break;
fi;
od;
res := res +
lcoeff(term_a)*lcoeff(term_b)*p;
od;
od;
res;
end;
Addendum Fri Aug 14 2015. The sequence for $Q=5$ and $N=20$ is
$$1, 5, 44, 966, 53484, 7023375, 1756229468, 710218125299,
\\ 411620592905173, 308212635851733551, 271743509344779773214,\ldots$$
Addendum Sat Aug 15 2015. The sequence for $Q=5$ and $N=22$ is
$$1, 5, 44, 966, 53529, 7041834, 1773511264, 734330857318,
\\ 452455270344141, 383969184978128899, 416614280701828877344,
\\ 536531456518633409220043, 766723127226754935510254929,\ldots$$
Addendum Wed Aug 19 2015. The sequence for $Q=5$ and $N=24$ is
$$1, 5, 44, 966, 53534, 7043732, 1775444689, 737776095236,
\\ 460462767067281, 405308264117856150, 477303563740811267063,
\\ 712445246443357547546003, 1271053814158420923816386794,\ldots$$