MultiFactorial := function(n, k)
    local r;
    r := 1;
    while n > 1 do
        r := r*n;
        n := n - k;
    od;
    return r;
end;

PrintArray(List([1 .. 10], n -> List([1 .. 5], k -> MultiFactorial(n, k))));
[ [        1,        1,        1,        1,        1 ],
  [        2,        2,        2,        2,        2 ],
  [        6,        3,        3,        3,        3 ],
  [       24,        8,        4,        4,        4 ],
  [      120,       15,       10,        5,        5 ],
  [      720,       48,       18,       12,        6 ],
  [     5040,      105,       28,       21,       14 ],
  [    40320,      384,       80,       32,       24 ],
  [   362880,      945,      162,       45,       36 ],
  [  3628800,     3840,      280,      120,       50 ] ]
