OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..100
Richard P. Stanley, Parking Functions, 2011.
EXAMPLE
The number of lambda-parking functions induced by the partitions of 4 into distinct parts:
5 by [1,3]: [1,1], [1,2], [2,1], [1,3], [3,1],
4 by [4]: [1], [2], [3], [4].
a(4) = 5 + 4 = 9.
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`(i*(i+1)/2<n, 0, `if`(n=0, p(l),
g(n, i-1, l)+`if`(i>n, 0, g(n-i, i-1, [i, l[]])))):
a:= n-> g(n$2, []):
seq(a(n), n=0..35);
MATHEMATICA
p[l_] := With[{n = Length[l]}, n!*Det[Table[Function[t,
If[t < 0, 0, l[[i]]^t/t!]][j - i + 1], {i, n}, {j, n}]]];
g[n_, i_, l_] := If[i (i + 1)/2 < n, 0, If[n == 0, p[l],
g[n, i - 1, l] + If[i > n, 0, g[n - i, i - 1, Prepend[l, i]]]]];
a[n_] := If[n == 0, 1, g[n, n, {}]];
Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Aug 20 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Nov 30 2015
STATUS
approved