[go: up one dir, main page]

login
Triangle T(n, k, q) = binomial(n, k) - 1 + q^(n*binomial(n-2, k-1)) with T(n, 0, q) = T(n, n, q) = 1 and q = 3, read by rows.
2

%I #7 Feb 19 2021 18:34:37

%S 1,1,1,1,10,1,1,29,29,1,1,84,6566,84,1,1,247,14348916,14348916,247,1,

%T 1,734,282429536495,150094635296999140,282429536495,734,1,1,2193,

%U 50031545098999727,2503155504993241601315571986085883,2503155504993241601315571986085883,50031545098999727,2193,1

%N Triangle T(n, k, q) = binomial(n, k) - 1 + q^(n*binomial(n-2, k-1)) with T(n, 0, q) = T(n, n, q) = 1 and q = 3, read by rows.

%H G. C. Greubel, <a href="/A173045/b173045.txt">Rows n = 0..11 of the triangle, flattened</a>

%F T(n, k, q) = binomial(n, k) - 1 + q^(n*binomial(n-2, k-1)) with T(n, 0, q) = T(n, n, q) = 1 and q = 3.

%F Sum_{k=0..n} T(n, k, 3) = A000295(n) + Sum_{k=0..n} 3^(n*binomial(n-2, k-1)). - _G. C. Greubel_, Feb 19 2021

%e Triangle begins as:

%e 1;

%e 1, 1;

%e 1, 10, 1;

%e 1, 29, 29, 1;

%e 1, 84, 6566, 84, 1;

%e 1, 247, 14348916, 14348916, 247, 1;

%e 1, 734, 282429536495, 150094635296999140, 282429536495, 734, 1;

%t T[n_, k_, q_]:= If[k==0 || k==n, 1, Binomial[n, k] - 1 + q^(n*Binomial[n-2, k-1])];

%t Table[t[n, k, 3], {n,0,9}, {k,0,n}]//Flatten (* modified by _G. C. Greubel_, Feb 19 2021 *)

%o (Sage)

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

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

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

%o flatten([[T(n,k,3) for k in (0..n)] for n in (0..9)]) # _G. C. Greubel_, Feb 19 2021

%o (Magma)

%o T:= func< n,k,q | k eq 0 or k eq n select 1 else Binomial(n,k) -1 +q^(n*Binomial(n-2, k-1)) >;

%o [T(n,k,3): k in [0..n], n in [0..9]]; // _G. C. Greubel_, Feb 19 2021

%Y Cf. A132044 (q=0), A007318 (q=1), A173043 (q=2), this sequence (q=3).

%Y Cf. A000295.

%K nonn,tabl

%O 0,5

%A _Roger L. Bagula_, Feb 08 2010

%E Edited by _G. C. Greubel_, Feb 19 2021