cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A101491 Triangle T(n,k), read by rows: number of Knödel walks starting at 0, ending at k, with n steps.

Original entry on oeis.org

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

Views

Author

Ralf Stephan, Jan 21 2005

Keywords

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,
  ...
		

Crossrefs

Left-hand columns include A086905, A037952, A037955, A037951, A037956, A037953, A037957, A037954, A037958.

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)).