OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..50
R. Stanley, Parking Functions, 2011
EXAMPLE
The number of lambda-parking functions induced by the partitions of 4:
1 by [1,1,1,1]: [1,1,1,1],
4 by [1,1,2]: [1,1,1], [1,1,2], [1,2,1], [2,1,1],
4 by [2,2]: [1,1], [1,2], [2,1], [2,2],
5 by [1,3]: [1,1], [1,2], [2,1], [1,3], [3,1],
4 by [4]: [1], [2], [3], [4].
a(4) = 1 + 4 + 4 + 5 + 4 = 18.
MAPLE
p:= l-> (n-> n!*LinearAlgebra[Determinant](Matrix(n, (i, j)
-> (t->`if`(t<0, 0, l[i]^t/t!))(j-i+1))))(nops(l)):
g:= (n, i, l)-> `if`(n=0 or i=1, p([1$n, l[]]), g(n, i-1, l)
+`if`(i>n, 0, g(n-i, i, [i, l[]]))):
a:= n-> g(n$2, []):
seq(a(n), n=0..20);
MATHEMATICA
p[l_] := With[{n = Length[l]}, n! Det[Table[With[{t = j - i + 1},
If[t < 0, 0, l[[i]]^t/t!]], {i, n}, {j, n}]]];
g[n_, i_, l_] := If[n == 0 || i == 1, p[Join[
Table[1, {n}], l]], g[n, i - 1, l] +
If[i > n, 0, g[n - i, i, Prepend[l, i]]]];
a[n_] := If[n == 0, 1, g[n, n, {}]];
Table[a[n], {n, 0, 32}] (* Jean-François Alcover, Aug 22 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Nov 29 2015
STATUS
approved