A101491 Triangle T(n,k), read by rows: number of Knödel walks starting at 0, ending at k, with n steps.
1, 0, 1, 2, 1, 1, 1, 3, 1, 1, 5, 4, 4, 1, 1, 5, 10, 5, 5, 1, 1, 15, 15, 15, 6, 6, 1, 1, 20, 35, 21, 21, 7, 7, 1, 1, 50, 56, 56, 28, 28, 8, 8, 1, 1, 76, 126, 84, 84, 36, 36, 9, 9, 1, 1, 176, 210, 210, 120, 120, 45, 45, 10, 10, 1, 1, 286, 462, 330, 330, 165, 165, 55, 55, 11, 11, 1, 1
Offset: 0
Examples
Triangle begins: 1, 0,1, 2,1,1, 1,3,1,1, 5,4,4,1,1, 5,10,5,5,1,1, 15,15,15,6,6,1,1, 20,35,21,21,7,7,1,1, 50,56,56,28,28,8,8,1,1, 76,126,84,84,36,36,9,9,1,1, ...
Links
- Paolo Xausa, Table of n, a(n) for n = 0..11475 (rows 0..150 of triangle, flattened).
- Helmut Prodinger, The Kernel Method: a collection of examples, Séminaire Lotharingien de Combinatoire, B50f (2004), 19 pp.
Crossrefs
Programs
-
Mathematica
A101491[n_, k_] := If[k == 0, Sum[(-1)^(n - i)*Binomial[i, BitShiftRight[i]], {i, 0, n}], Binomial[n, BitShiftRight[n - k]]]; Table[A101491[n, k], {n, 0, 15}, {k, 0, n}] (* Paolo Xausa, Jan 17 2025 *)
-
PARI
T(n, k) = if (k==0, sum(i=0, n, (-1)^(n-i)*binomial(i, i\2)), binomial(n, (n-k)\2)); tabl(nn) = for (n=0, nn, for (k=0, n, print1(T(n, k), ", ")); print();); \\ Michel Marcus, Dec 04 2016
Formula
G.f.: r(z)/(z*(1+z)*(1-r(z)))*(1+x*z*r(z))/(1-x*r(z)), with r(z) = (1-sqrt(1-4*z^2))/(2*z). Then the g.f. of the k-th column is r(z)^(k+1)/(z*(1-r(z))).
T(n, k) = Sum_{i=0..n} (-1)^(n-i)*C(i, floor(i/2)) for k=0, otherwise T(n, k) = C(n, floor((n-k)/2)).
Comments