login
Mirror of the triangle A193736.
7

%I #29 Oct 27 2023 13:09:44

%S 1,1,1,1,2,1,2,4,3,1,3,8,8,4,1,5,15,19,13,5,1,8,28,42,36,19,6,1,13,51,

%T 89,91,60,26,7,1,21,92,182,216,170,92,34,8,1,34,164,363,489,446,288,

%U 133,43,9,1,55,290,709,1068,1105,826,455,184,53,10,1,89,509,1362,2266,2619,2219,1414,682,246,64,11,1

%N Mirror of the triangle A193736.

%C This triangle is obtained by reversing the rows of the triangle A193736.

%H G. C. Greubel, <a href="/A193737/b193737.txt">Rows n = 0..50 of the triangle, flattened</a>

%F Write w(n,k) for the triangle at A193736. This is then given by w(n,n-k).

%F T(0,0) = T(1,0) = T(1,1) = T(2,0) = 1; T(n,k) = 0 if k<0 or k>n; T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k). - _Philippe Deléham_, Feb 13 2020

%F From _G. C. Greubel_, Oct 24 2023: (Start)

%F T(n, 0) = Fibonacci(n) + [n=0] = A324969(n+1).

%F T(n, n-1) = n, for n >= 1.

%F T(n, n-2) = A034856(n-1), for n >= 2.

%F T(2*n, n) = A330793(n).

%F Sum_{k=0..n} T(n,k) = A052542(n).

%F Sum_{k=0..n} (-1)^k * T(n,k) = A000007(n).

%F Sum_{k=0..floor(n/2)} T(n-k, k) = A011782(n).

%F Sum_{k=0..floor(n/2)} (-1)^k * T(n-k,k) = A019590(n). (End)

%e First six rows:

%e 1;

%e 1, 1;

%e 1, 2, 1;

%e 2, 4, 3, 1;

%e 3, 8, 8, 4, 1;

%e 5, 15, 19, 13, 5, 1;

%t (* First program *)

%t z=20;

%t p[0, x_]:= 1;

%t p[n_, x_]:= Fibonacci[n+1, x] /; n > 0

%t q[n_, x_]:= (x + 1)^n;

%t t[n_, k_]:= Coefficient[p[n, x], x^(n-k)];

%t t[n_, n_]:= p[n, x] /. x -> 0;

%t w[n_, x_]:= Sum[t[n, k]*q[n-k+1, x], {k,0,n}]; w[-1, x_] := 1;

%t g[n_]:= CoefficientList[w[n, x], {x}]

%t TableForm[Table[Reverse[g[n]], {n, -1, z}]]

%t Flatten[Table[Reverse[g[n]], {n,-1,z}]] (* A193736 *)

%t TableForm[Table[g[n], {n,-1,z}]]

%t Flatten[Table[g[n], {n,-1,z}]] (* A193737 *)

%t (* Additional programs *)

%t (* Function RiordanSquare defined in A321620. *)

%t RiordanSquare[1 + 1/(1 - x - x^2), 11]//Flatten (* _Peter Luschny_, Feb 27 2021 *)

%t T[n_, k_]:= T[n, k]= If[n<3, Binomial[n, k], T[n-1,k] + T[n-1,k-1] + T[n-2,k]];

%t Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* _G. C. Greubel_, Oct 24 2023 *)

%o (Magma)

%o function T(n,k) // T = A193737

%o if k lt 0 or n lt 0 then return 0;

%o elif n lt 3 then return Binomial(n,k);

%o else return T(n - 1, k) + T(n - 1, k - 1) + T(n - 2, k);

%o end if;

%o end function;

%o [T(n,k): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Oct 24 2023

%o (SageMath)

%o def T(n,k): # T = A193737

%o if (n<3): return binomial(n,k)

%o else: return T(n-1,k) +T(n-1,k-1) +T(n-2,k)

%o flatten([[T(n,k) for k in range(n+1)] for n in range(13)]) # _G. C. Greubel_, Oct 24 2023

%Y Cf. A000007, A011782 (diagonal sums), A019590, A052542 (row sums).

%Y Cf. A034856, A193736, A321620, A324969, A330793.

%K nonn,tabl

%O 0,5

%A _Clark Kimberling_, Aug 04 2011