login
Triangle read by rows: T(n,2k+1) = T(n-1,2k-1)+T(n-1,2k), T(n,2k) = T(n-1,2k-2)+2T(n-1,2k-1)+T(n-1,2k).
1

%I #16 Dec 03 2017 17:17:43

%S 1,1,1,1,1,1,4,2,1,1,1,7,5,9,3,1,1,1,10,8,26,14,16,4,1,1,1,13,11,52,

%T 34,70,30,25,5,1,1,1,16,14,87,63,190,104,155,55,36,6,1,1,1,19,17,131,

%U 101,403,253,553,259,301,91,49,7,1,1,1,22,20,184

%N Triangle read by rows: T(n,2k+1) = T(n-1,2k-1)+T(n-1,2k), T(n,2k) = T(n-1,2k-2)+2T(n-1,2k-1)+T(n-1,2k).

%H Johann Cigler, <a href="http://arxiv.org/abs/1501.04750">Some remarks and conjectures related to lattice paths in strips along the x-axis</a>, arXiv:1501.04750 [math.CO], 2015-2016.

%e Triangle begins:

%e 1

%e 1 1 1

%e 1 1 4 2 1

%e 1 1 7 5 9 3 1

%e 1 1 10 8 26 14 16 4 1

%e 1 1 13 11 52 34 70 30 25 5 1

%e ...

%p A247642 := proc(n,k)

%p option remember;

%p if k < 0 or k > 2*n then

%p return 0;

%p elif k = 0 then

%p return 1 ;

%p end if;

%p if type(k,'odd') then

%p procname(n-1,k-2)+procname(n-1,k-1) ;

%p else

%p procname(n-1,k-2)+2*procname(n-1,k-1)+procname(n-1,k) ;

%p end if;

%p end proc: # _R. J. Mathar_, Oct 25 2014

%t T[_, 0] = 1; T[n_, k_] /; 0 <= k <= 2n := T[n, k] = If[OddQ[k], T[n-1, k-2] + T[n-1, k-1], T[n-1, k-2] + 2*T[n-1, k-1] + T[n-1, k]]; T[_, _] = 0;

%t Table[T[n, k], {n, 0, 8}, {k, 0, 2n}] // Flatten (* _Jean-François Alcover_, Dec 03 2017 *)

%Y Cf. A000244 (row sums).

%K nonn,tabf

%O 0,7

%A _N. J. A. Sloane_, Sep 23 2014