login
Triangle, read by rows, where T(0,0) = 1, T(n,k) = 2^n*T(n-1,k) + T(n-1,k-1).
4

%I #22 Feb 20 2021 23:12:01

%S 1,2,1,8,6,1,64,56,14,1,1024,960,280,30,1,32768,31744,9920,1240,62,1,

%T 2097152,2064384,666624,89280,5208,126,1,268435456,266338304,87392256,

%U 12094464,755904,21336,254,1,68719476736,68451041280,22638755840,3183575040,205605888,6217920,86360,510,1

%N Triangle, read by rows, where T(0,0) = 1, T(n,k) = 2^n*T(n-1,k) + T(n-1,k-1).

%C Triangle T(n,k), 0 <= k <= n, read by rows given by [2, 2, 8, 12, 32, 56, 128, 240, 512, ...] DELTA [[1, 0, 2, 0, 4, 0, 8, 0, 16, 0, 32, 0, ...] = A014236 (first zero omitted) DELTA A077957 where DELTA is the operator defined in A084938. - _Philippe Deléham_, Aug 23 2006

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

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

%F T(n,0) = 2^(n*(n+1)/2) = A006125(n+1). - _Philippe Deléham_, Nov 05 2006

%F T(n,k) = 2^binomial(n+1-k,2) * A022166(n,k) for 0 <= k <= n. - _Werner Schulte_, Mar 25 2019

%e Triangle begins:

%e 1;

%e 2, 1;

%e 8, 6, 1;

%e 64, 56, 14, 1;

%e 1024, 960, 280, 30, 1;

%e 32768, 31744, 9920, 1240, 62, 1;

%t T[n_, k_, q_]:= T[n,k,q]= If[k<0 || k>n, 0, If[k==n, 1, q^n*T[n-1,k,q] +T[n-1,k-1,q] ]];

%t Table[T[n,k,2], {n,0,10}, {k,0,n}]//Flatten (* _G. C. Greubel_, Feb 20 2021 *)

%o (Sage)

%o def T(n, k, q):

%o if (k<0 or k>n): return 0

%o elif (k==n): return 1

%o else: return q^n*T(n-1,k,q) + T(n-1,k-1,q)

%o flatten([[T(n,k,2) for k in (0..n)] for n in (0..10)]) # _G. C. Greubel_, Feb 20 2021

%o (Magma)

%o function T(n,k,q)

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

%o elif k eq n then return 1;

%o else return q^n*T(n-1,k,q) + T(n-1,k-1,q);

%o end if; return T; end function;

%o [T(n,k,2): k in [0..n], n in [0..10]]; // _G. C. Greubel_, Feb 20 2021

%Y Cf. A023531 (q=0), A007318 (q=1), this sequence (q=2), A173007 (q=3), A173008 (q=4).

%Y Cf. A006125, A022166, A028362.

%K nonn,tabl

%O 0,2

%A _Gerald McGarvey_, Jun 05 2005