login
A210486
Number of paths starting at {3}^n to a border position where one component equals 0 using steps that decrement one component by 1.
2
0, 1, 20, 543, 22096, 1304045, 106478916, 11545342795, 1608000044288, 280061940550041, 59677171216017940, 15278632095285640631, 4628964787172536267920, 1638318264614752659427333, 669895681115518466689138436, 313418973409285344224352078435
OFFSET
0,3
LINKS
FORMULA
a(n) ~ sqrt(Pi) * 2^(n+1) * n^(2*n+3/2) / exp(2*n-1). - Vaclav Kotesovec, Sep 02 2014
EXAMPLE
a(1) = 1: [3, 2, 1, 0].
a(2) = 20: [33, 23, 13, 03], [33, 23, 13, 12, 02], [33, 23, 13, 12, 11, 01], [33, 23, 13, 12, 11, 10], [33, 23, 22, 12, 02], [33, 23, 22, 12, 11, 01], [33, 23, 22, 12, 11, 10], [33, 23, 22, 21, 11, 01], [33, 23, 22, 21, 11, 10], [33, 23, 22, 21, 20], [33, 32, 22, 12, 02], [33, 32, 22, 12, 11, 01], [33, 32, 22, 12, 11, 10], [33, 32, 22, 21, 11, 01], [33, 32, 22, 21, 11, 10], [33, 32, 22, 21, 20], [33, 32, 31, 21, 11, 01], [33, 32, 31, 21, 11, 10], [33, 32, 31, 21, 20], [33, 32, 31, 30].
MAPLE
a:= proc(n) option remember; `if`(n<3, [0, 1, 20][n+1],
((n-1)*(n-2)*(n+1)*a(n-3) -(n-1)*(3*n^2-2*n-4)*a(n-2)
+(2*n+1)*(n^2-n+2)*a(n-1)) / (n-1))
end:
seq(a(n), n=0..20); # Alois P. Heinz, Jan 23 2013
MATHEMATICA
a[n_] := a[n] = If[n<3, {0, 1, 20}[[n+1]], ((n-1)*(n-2)*(n+1)*a[n-3] - (n-1)*(3*n^2 - 2*n - 4)*a[n-2] + (2*n+1)*(n^2 - n + 2)*a[n-1]) / (n-1)];
Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Mar 29 2017, after Alois P. Heinz *)
CROSSREFS
Row n=3 of A210472.
Sequence in context: A337352 A180882 A202920 * A047682 A231249 A012568
KEYWORD
nonn,walk
AUTHOR
Alois P. Heinz, Jan 23 2013
STATUS
approved