login
Unimodal analog of binomial coefficient, such that A071921(n,m) = a(n+m-1,n) for all (n,m) different from (0,0), arranged in a Pascal-like triangle.
6

%I #33 Sep 08 2022 08:45:06

%S 1,1,1,1,2,1,1,3,4,1,1,4,9,7,1,1,5,16,22,11,1,1,6,25,50,46,16,1,1,7,

%T 36,95,130,86,22,1,1,8,49,161,295,296,148,29,1,1,9,64,252,581,791,610,

%U 239,37,1,1,10,81,372,1036,1792,1897,1163,367,46,1,1,11,100,525,1716,3612

%N Unimodal analog of binomial coefficient, such that A071921(n,m) = a(n+m-1,n) for all (n,m) different from (0,0), arranged in a Pascal-like triangle.

%C Also, number of n-length k-ary words avoiding the pattern 1'-2-1". - _Ralf Stephan_, Apr 28 2004

%C The matrix inverse starts

%C 1;

%C -1, 1;

%C 1, -2, 1;

%C -2, 5, -4, 1;

%C 8, -21, 19, -7, 1;

%C -56, 148, -137, 55, -11, 1;

%C 608, -1608, 1493, -608, 130, -16, 1;

%C -9440, 24968, -23190, 9461, -2044, 266, -22, 1;

%C 198272, -524416, 487088, -198761, 42997, -5642, 490, -29, 1; - _R. J. Mathar_, Mar 15 2013

%H G. C. Greubel, <a href="/A071922/b071922.txt">Rows n = 0..100 of triangle, flattened</a>

%H S. Kitaev and T. Mansour, <a href="https://arxiv.org/abs/math/0210023">Partially ordered generalized patterns and k-ary words</a>, arXiv:math/0210023 [math.CO], 2003.

%H S. Kitaev and T. Mansour, <a href="https://doi.org/10.1007/s00026-003-0181-3">Partially ordered generalized patterns and k-ary words</a>, Annals of Combinatorics, 7(2) (2003), 191-200.

%F a(n, m) = Sum_{k=0..n-m} binomial(2*k+m-1, 2*k).

%F Sum_{m=0..n} a(n, m) = 1 + Fibonacci(2*n).

%F Sum_{m=0..n} (-1)^m*a(n, m) = 1 if 3 divides n, 0 otherwise.

%F G.f. for k-th row: 1/(1-x)^(2k-1) + Sum_{j=1..k-1} x/(1-x)^(2j). - _Ralf Stephan_, Apr 28 2004

%e Triangle begins

%e 1;

%e 1, 1;

%e 1, 2, 1;

%e 1, 3, 4, 1;

%e 1, 4, 9, 7, 1;

%e 1, 5, 16, 22, 11, 1;

%e 1, 6, 25, 50, 46, 16, 1;

%e 1, 7, 36, 95, 130, 86, 22, 1;

%p A071922 := proc(n,k)

%p add( binomial(2*j+k-1,2*j),j=0..n-k) ;

%p end proc: # _R. J. Mathar_, Mar 15 2013

%t a[n_, m_]:= Sum[Binomial[2k+m-1, 2k], {k, 0, n-m}]; Flatten[ Table[ a[n, m], {n, 0, 11}, {m, 0, n}]]

%o (PARI) a(n,k) = sum(j=0, n-k, binomial(2*j+k-1, 2*j));

%o for(n=0,11, for(k=0,n, print1(a(n,k), ", "))) \\ _G. C. Greubel_, Aug 26 2019

%o (Magma) [&+[Binomial(2*j+k-1, 2*j): j in [0..n-k]]: k in [0..n], n in [0..11]]; // _G. C. Greubel_, Aug 26 2019

%o (Sage) [[sum(binomial(2*j+k-1, 2*j) for j in (0..n-k)) for k in (0..n)] for n in (0..11)] # _G. C. Greubel_, Aug 26 2019

%o (GAP) Flat(List([0..11], n-> List([0..n], k-> Sum([0..n-k], j-> Binomial( 2*j+k-1, 2*j) )))); # _G. C. Greubel_, Aug 26 2019

%K nonn,easy,tabl

%O 0,5

%A Michele Dondi (bik.mido(AT)tiscalinet.it), Jun 14 2002

%E Edited by _Robert G. Wilson v_, Jun 17 2002