login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Triangle read by rows: T(n,k) = T(n,k+1) + T(n-k,k-1) with T(0,0) = 1 and T(n,k) = 0 if k<0 or k > A003056(n).
3

%I #32 Nov 14 2020 07:58:08

%S 1,1,1,1,1,2,2,1,3,3,1,5,5,2,9,9,4,1,15,15,6,1,26,26,11,2,45,45,19,4,

%T 78,78,33,7,1,135,135,57,12,1,234,234,99,21,2,406,406,172,37,4,704,

%U 704,298,64,7,1222,1222,518,112,13,1,2120,2120,898,194,22,1,3679

%N Triangle read by rows: T(n,k) = T(n,k+1) + T(n-k,k-1) with T(0,0) = 1 and T(n,k) = 0 if k<0 or k > A003056(n).

%H Seiichi Manyama, <a href="/A288267/b288267.txt">Rows n = 0..481, flattened</a>

%e First few rows are:

%e 1;

%e 1, 1;

%e 1, 1;

%e 2, 2, 1;

%e 3, 3, 1;

%e 5, 5, 2;

%e 9, 9, 4, 1;

%e 15, 15, 6, 1.

%p T:= proc(n,k) option remember; `if`(k<0 or k*(k+1)/2>n, 0,

%p `if`(n=0, 1, T(n, k+1)+T(n-k, k-1)))

%p end:

%p seq(seq(T(n, k), k=0..floor((sqrt(1+8*n)-1)/2)), n=0..20); # _Alois P. Heinz_, Sep 01 2017

%t T[n_, k_] := T[n, k] = If[k < 0 || k(k+1)/2 > n, 0, If[n == 0, 1, T[n, k+1] + T[n-k, k-1]]];

%t Table[T[n, k], {n, 0, 20}, {k, 0, Floor[(Sqrt[8n+1]-1)/2]}] // Flatten (* _Jean-François Alcover_, Nov 14 2020, after _Alois P. Heinz_ *)

%Y Columns 0+1,2 give A005169, A289080 (for n>0).

%Y Cf. A003056.

%K nonn,tabf

%O 0,6

%A _Seiichi Manyama_, Sep 01 2017