OFFSET
1,2
COMMENTS
Consider the ranked poset L(n) of partitions defined in A002846. Then a(n) is the total number of paths of all lengths 0,1,...,n-1 that start at any node in the poset and end at 1^n.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..50
Olivier Gérard, The ranked posets L(2),...,L(8)
EXAMPLE
For n=5 there are a(5) = 12 paths to 1^5 = 11111: 11111; 2111->11111; 221->2111->11111; 311->2111->11111; 32->221->2111->11111; 32->311->2111->11111; 41->221->2111->11111; 41->311->2111->11111; 5->32->221->2111->11111; 5->32->311->2111->11111; 5->41->221->2111->11111; 5->41->311->2111->11111.
MAPLE
b:= proc(l) option remember; local n, i, j, t; n:=nops(l);
`if`(n<2, 1, `if`(l[n]=0, b(subsop(n=NULL, l)),
add(`if`(l[i]=0, 0, add(b([seq(l[t]-`if`(t=1, l[t],
`if`(t=i, 1, `if`(t=j and t=i-j, -2, `if`(t=j or t=i-j,
-1, 0)))), t=1..n)]), j=1..i/2)), i=2..n)))
end:
g:= proc(n, i, l)
`if`(n=0 and i=0, b(l), `if`(i=1, b([n, l[]]), add(g(n-i*j, i-1,
`if`(l=[] and j=0, l, [j, l[]])), j=0..n/i)))
end:
a:= n-> g(n, n, []):
seq(a(n), n=1..25);
MATHEMATICA
b[l_] := b[l] = With[{n = Length[l]}, If[n < 2, 1, If[l[[n]] == 0, b[ReplacePart[l, n -> Sequence[] ]], Sum[If[l[[i]] == 0, 0, Sum[b[Join[Table[l[[t]]-If[t == 1, l[[t]], If[t == i, 1, If[t == j && t == i-j, -2, If[t == j || t == i-j, -1, 0]]]], {t, 1, n}]]], {j, 1, i/2}]], {i, 2, n}]]] ]; g[n_, i_, l_] := If[n == 0 && i == 0, b[l], If[i == 1, b[Prepend[l, n]], Sum[g[n-i*j, i-1, If[l == {} && j == 0, l, Prepend[ l, j]]], {j, 0, n/i}]]] ; a[n_] := g[n, n, {}]; Table[a[n], {n, 1, 27}] // Flatten (* Jean-François Alcover, Dec 18 2013, translated from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jun 14 2012
EXTENSIONS
Edited by Alois P. Heinz at the suggestion of Gus Wiseman, May 02 2016
STATUS
approved