login
Triangular array associated with Schroeder numbers: T(0,0) = 1, T(n,0) = 0 for n > 0; T(n,k) = 0 if k < n; T(n,k) = T(n,k-1) + T(n-1,k-1) + T(n-1,k).
2

%I #41 Sep 07 2021 02:33:13

%S 1,0,1,0,1,2,0,1,4,6,0,1,6,16,22,0,1,8,30,68,90,0,1,10,48,146,304,394,

%T 0,1,12,70,264,714,1412,1806,0,1,14,96,430,1408,3534,6752,8558,0,1,16,

%U 126,652,2490,7432,17718,33028,41586,0,1,18,160,938,4080,14002,39152,89898,164512,206098

%N Triangular array associated with Schroeder numbers: T(0,0) = 1, T(n,0) = 0 for n > 0; T(n,k) = 0 if k < n; T(n,k) = T(n,k-1) + T(n-1,k-1) + T(n-1,k).

%H Reinhard Zumkeller, <a href="/A106579/b106579.txt">Rows n = 0..120 of triangle, flattened</a>

%H G. Kreweras, <a href="http://www.numdam.org/item?id=BURO_1973__20__3_0">Sur les hiérarchies de segments</a>, Cahiers du Bureau Universitaire de Recherche Opérationnelle, Institut de Statistique, Université de Paris, #20 (1973).

%H G. Kreweras, <a href="/A001844/a001844.pdf">Sur les hiérarchies de segments</a>, Cahiers du Bureau Universitaire de Recherche Opérationnelle, Institut de Statistique, Université de Paris, #20 (1973). (Annotated scanned copy)

%F G.f.: Sum T(n, k)*x^n*y^k = 1 + y*(1 - x*y - (x^2*y^2 - 6*x*y + 1)^(1/2))/(2*y + x*y - 1 + (x^2*y^2 - 6*x*y + 1)^(1/2)).

%e Triangle starts

%e 1;

%e 0, 1;

%e 0, 1, 2;

%e 0, 1, 4, 6;

%e 0, 1, 6, 16, 22;

%e 0, 1, 8, 30, 68, 90;

%e 0, 1, 10, 48, 146, 304, 394;

%e 0, 1, 12, 70, 264, 714, 1412, 1806;

%e ...

%t T[n_, k_]:= T[n, k]= Which[n==k==0, 1, n==0, 0, k==0, 0, k>n, 0, True, T[n, k-1] + T[n-1, k-1] + T[n-1, k]]; Table[T[n, k], {n,0,11}, {k,0,n}]//Flatten (* _Michael De Vlieger_, Nov 05 2017 *)

%o (Haskell)

%o a106579 n k = a106579_tabl !! n !! k

%o a106579_row n = a106579_tabl !! n

%o a106579_tabl = [1] : iterate

%o (\row -> scanl1 (+) $ zipWith (+) ([0] ++ row) (row ++ [0])) [0,1]

%o -- _Reinhard Zumkeller_, Apr 17 2013

%o (Sage)

%o def A106579_row(n):

%o if n==0: return [1]

%o @cached_function

%o def prec(n, k):

%o if k==n: return -1

%o if k==0: return 0

%o return prec(n-1,k-1)-2*sum(prec(n,k+i-1) for i in (2..n-k+1))

%o return [(-1)^k*prec(n, n-k+1) for k in (0..n)]

%o for n in (0..10): print(A106579_row(n)) # _Peter Luschny_, Mar 16 2016

%Y Essentially the same as A033877 except with a leading column 1, 0, 0, 0, ...

%Y Last diagonal: A006318 or A103137.

%Y Row sums give A001003.

%Y See A033877 for more comments and references.

%K nonn,tabl

%O 0,6

%A _N. J. A. Sloane_, May 30 2005