OFFSET
0,2
COMMENTS
See Bayer and Brandt for a description of the pill tree.
LINKS
Margaret Bayer and Keith Brandt, The Pill Problem, Lattice Paths and Catalan Numbers, preprint, Mathematics Magazine, Vol. 87, No. 5 (December 2014), pp. 388-394.
Keith Brandt and Kaleb Waite, Using recursion to solve the pill problem, Journal of Computing Sciences in Colleges, Volume 24, Issue 5, May 2009.
Charlotte A. C. Brennan and Helmut Prodinger, The pills problem revisited, preprint, Quaest. Math., 26(4):427-439, 2003.
Donald E. Knuth, John McCarthy, Walter Stromquist, Daniel H. Wagner, and Tim Hesterberg, Problem E3429. Big pills and little pills, The American Mathematical Monthly, 99(7):684, 1992.
FORMULA
T(0,k) = k+1; T(n,0) = 1 + T(n-1,1); T(n,k) = 1 + T(n-1,k+1) + T(n,k-1))) for n and k > 0.
T(n,k) = Sum_{j=0..n} (binomial(2*j+k+2, j+1) - binomial(2*j+k+2, j)).
EXAMPLE
The array begins:
1 2 3 4 5 6 ...
3 7 12 18 25 33 ...
8 21 40 66 100 143 ...
22 63 130 231 375 572 ...
64 195 427 803 1376 2210 ...
196 624 1428 2805 5016 8398 ...
...
PROG
(PARI) T(n, k) = sum(j=0, n, binomial(2*j+k+2, j+1) - binomial(2*j+k+2, j));
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Michel Marcus, May 21 2020
STATUS
approved