A276902 Number of positive walks with n steps {-3,-2,-1,0,1,2,3} starting at the origin, ending at altitude 1, and staying strictly above the x-axis.
0, 1, 3, 12, 56, 284, 1526, 8530, 49106, 289149, 1733347, 10542987, 64904203, 403632551, 2531971729, 16002136283, 101795589297, 651286316903, 4188174878517, 27055199929042, 175488689467350, 1142479579205721, 7462785088260791, 48896570201100002
Offset: 0
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1189
- C. Banderier, C. Krattenthaler, A. Krinik, D. Kruchinin, V. Kruchinin, D. Nguyen, and M. Wallner, Explicit formulas for enumeration of lattice paths: basketball and the kernel method, arXiv preprint arXiv:1609.06473 [math.CO], 2016.
Programs
-
Mathematica
walks[n_, k_, h_] = 0; walks[1, k_, h_] := Boole[0 < k <= h]; walks[n_, k_, h_] /; n >= 2 && k > 0 := walks[n, k, h] = Sum[walks[n - 1, k + x, h], {x, -h, h}]; (* walks represents the number of positive walks with n steps {-h, -h+1, ... , h} that end at altitude k *) A276902[n_] := (Do[walks[m, k, 3], {m, n}, {k, 3 m}]; walks[n, 1, 3]) (* Davin Park, Oct 10 2016 *)