login
Triangle generated by T(n,k) = q^k*T(n-1, k) + T(n-1, k-1), with q=4.
3

%I #11 Sep 08 2022 08:45:52

%S 1,1,1,1,17,1,1,273,81,1,1,4369,5457,337,1,1,69905,353617,91729,1361,

%T 1,1,1118481,22701393,23836241,1485393,5457,1,1,17895697,1454007633,

%U 6124779089,1544878673,23837265,21841,1,1,286331153,93074384209,1569397454417,1588080540241,99182316113,381680209,87377,1

%N Triangle generated by T(n,k) = q^k*T(n-1, k) + T(n-1, k-1), with q=4.

%C Row sums are: {1, 2, 19, 356, 10165, 516614, 49146967, 9165420200, 3350402793721, 2449781908163402, ...}.

%D Steve Roman, The Umbral Calculus, Dover Publications, New York (1984), page 176

%H G. C. Greubel, <a href="/A176244/b176244.txt">Rows n = 1..75 of triangle, flattened</a>

%F T(n,k) = T(n-1, k-1) + q^k*T(n-1, k), with q=4.

%e Triangle starts as:

%e 1;

%e 1, 1;

%e 1, 17, 1;

%e 1, 273, 81, 1;

%e 1, 4369, 5457, 337, 1;

%e 1, 69905, 353617, 91729, 1361, 1;

%e 1, 1118481, 22701393, 23836241, 1485393, 5457, 1;

%e 1, 17895697, 1454007633, 6124779089, 1544878673, 23837265, 21841, 1;

%p T:= proc(n, k) option remember;

%p q:=4;

%p if k=1 or k=n then 1

%p else T(n-1, k-1) + q^k*T(n-1, k)

%p fi; end:

%p seq(seq(T(n, k), k=1..n), n=1..12); # _G. C. Greubel_, Nov 22 2019

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

%t Table[T[n, k], {n,12}, {k,n}]//Flatten (* _G. C. Greubel_, Nov 22 2019 *)

%o (PARI) T(n,k) = my(q=4); if(k==1 || k==n, 1, q^k*T(n-1,k) + T(n-1,k-1)); \\ _G. C. Greubel_, Nov 22 2019

%o (Magma)

%o function T(n,k)

%o q:=4;

%o if k eq 1 or k eq n then return 1;

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

%o end if; return T; end function;

%o [T(n,k): k in [1..n], n in [1..12]]; // _G. C. Greubel_, Nov 22 2019

%o (Sage)

%o @CachedFunction

%o def T(n, k):

%o q=4;

%o if (k==1 or k==n): return 1

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

%o [[T(n, k) for k in (1..n)] for n in (1..12)] # _G. C. Greubel_, Nov 22 2019

%Y Cf. A176242 (q=2), A176243 (q=3), this sequence (q=4).

%K nonn,tabl

%O 1,5

%A _Roger L. Bagula_, Apr 12 2010

%E Edited by _G. C. Greubel_, Nov 22 2019