kill(all)$

van=T00209966$

Number_of_arrangments_of_N_sequences$

f(N):=N!$

precompute_cost_of_distances_between_N_sequences_of_length_L$

g(N, L):=N^2*L$

N:20$ L:20$

for n:0 thru N step 5 do
    for l:0 thru L step 5 do
        if(n>0 and l>0) then
            printf(true,
                "n: ~2d l: ~2d pre_cost: ~4d, arrangements: ~20d, total_cost: ~23d ~%",
                n, l, g(n,l), f(n), g(n,l)*f(n));