login
Triangular array read by rows: T(n,0) = 2^n, T(n,k) = Sum_{i=n-k..n, j=0..i-n+k, i<>n or j<>k} T(i,j) for k > 0.
1

%I #129 Jan 07 2024 17:16:51

%S 1,2,3,4,6,16,8,12,32,84,16,24,64,168,440,32,48,128,336,880,2304,64,

%T 96,256,672,1760,4608,12064,128,192,512,1344,3520,9216,24128,63168,

%U 256,384,1024,2688,7040,18432,48256,126336,330752,512,768,2048,5376,14080,36864,96512,252672,661504,1731840

%N Triangular array read by rows: T(n,0) = 2^n, T(n,k) = Sum_{i=n-k..n, j=0..i-n+k, i<>n or j<>k} T(i,j) for k > 0.

%H Andrew Howroyd, <a href="/A337129/b337129.txt">Table of n, a(n) for n = 0..1325</a> (rows 0..50)

%F T(n,0) = 2^n.

%F T(n,k) = ((3+sqrt(5))^(k+1)-(3-sqrt(5))^(k+1))*(2^(n-k))/(4*sqrt(5)) for 1<=k<=n.

%F T(n+1,n) = 2*T(n,n).

%F T(n+m,n) = 2^m*T(n,n), for m>=1.

%F T(n,n) = A069429(n) = 2^(n-1)*A001906(n+1) for n>=1.

%F T(2*n,n) = (1/2)*A099157(n+1) = A004171(n-1)*A001906(n+1) for n>=1.

%F G.f.: (1 - x*y)*(1 - 2*x*y)/((1 - 6*x*y + 4*x^2*y^2)*(1 - 2*x)). - _Andrew Howroyd_, Sep 23 2020

%e The triangle T(n,k) begins:

%e n\k 0 1 2 3 4 5

%e 0: 1

%e 1: 2 3

%e 2: 4 6 16

%e 3: 8 12 32 84

%e 4: 16 24 64 168 440

%e 5: 32 48 128 336 880 2304

%e ...

%e T(3,2) = ((3+sqrt(5))^3-(3-sqrt(5))^3)*(2)/(4*sqrt(5)) = (64*sqrt(5))/(2*sqrt(5)) = 32.

%p T := proc (n, k) if k = 0 and 0 <= n then 2^n elif 1 <= k and k <= n then round((((3+sqrt(5))^(k+1)-(3-sqrt(5))^(k+1))*(2^(n-k))/(4*sqrt(5)))) else 0 end if end proc:seq(print(seq(T(n, k), k=0..n)), n=0..9);

%t T[n_, 0] := 2^n;

%t T[n_, n_] := 2^(n-1) Fibonacci[2n+2];

%t T[n_, k_] /; 0<k<n := T[n, k] = 2 T[n-1, k];

%t Table[T[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Nov 13 2020 *)

%o (PARI) T(n,k) = if (k == 0, 2^n, my(w=quadgen(5, 'w)); ((2*w+2)^(k+1)-(4-2*w)^(k+1))*(2^(n-k))/(4*(2*w-1))); \\ _Michel Marcus_, Sep 14 2020

%o (PARI) Row(n)={Vecrev(polcoef((1-x*y)*(1-2*x*y)/((1-6*x*y+4*x^2*y^2)*(1-2*x)) + O(x*x^n), n))} \\ _Andrew Howroyd_, Sep 23 2020

%Y Cf. A000079 (1st column), A069429 (diagonal), A018903 (row sums), A001906, A004171.

%K nonn,tabl

%O 0,2

%A _Oboifeng Dira_, Sep 14 2020