login
A176225
A symmetrical triangle sequence: T(n, k) = q^k + q^(n-k) - q^n, with q=3.
4
1, 1, 1, 1, -3, 1, 1, -15, -15, 1, 1, -51, -63, -51, 1, 1, -159, -207, -207, -159, 1, 1, -483, -639, -675, -639, -483, 1, 1, -1455, -1935, -2079, -2079, -1935, -1455, 1, 1, -4371, -5823, -6291, -6399, -6291, -5823, -4371, 1, 1, -13119, -17487, -18927, -19359, -19359, -18927, -17487, -13119, 1
OFFSET
0,5
COMMENTS
Row sums are: {1, 2, -1, -28, -163, -730, -2917, -10936, -39367, -137782, -472393, ...}.
FORMULA
T(n,k) = q^k + q^(n-k) - q^n, with q = 3.
EXAMPLE
Triangle begins as:
1;
1, 1;
1, -3, 1;
1, -15, -15, 1;
1, -51, -63, -51, 1;
1, -159, -207, -207, -159, 1;
1, -483, -639, -675, -639, -483, 1;
1, -1455, -1935, -2079, -2079, -1935, -1455, 1;
1, -4371, -5823, -6291, -6399, -6291, -5823, -4371, 1;
MAPLE
q:=3; seq(seq(q^k +q^(n-k) -q^n, k=0..n), n=0..12); # G. C. Greubel, Nov 23 2019
MATHEMATICA
T[n_, k_, q_]:= q^k +q^(n-k) -q^n; Table[T[n, k, 3], {n, 0, 12}, {k, 0, n}]//Flatten (* modified by G. C. Greubel, Nov 23 2019 *)
PROG
(PARI) T(n, k, q) = my(q=3); q^k +q^(n-k) -q^n; \\ G. C. Greubel, Nov 23 2019
(Magma) q:=3; [q^k +q^(n-k) -q^n : k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 23 2019
(Sage) q=3; [[q^k +q^(n-k) -q^n for k in (0..n)] for n in (0..12)] # G. C. Greubel, Nov 23 2019
(GAP) q:=3;; Flat(List([0..12], n-> List([0..n], k-> q^k +q^(n-k) -q^n ))); # G. C. Greubel, Nov 23 2019
CROSSREFS
Cf. A176224 (q=2), this sequence (q=3), A176226 (q=5), A176227 (q=4).
Sequence in context: A110112 A370691 A326800 * A173917 A174410 A156690
KEYWORD
sign,tabl
AUTHOR
Roger L. Bagula, Apr 12 2010
EXTENSIONS
Edited by G. C. Greubel, Nov 23 2019
STATUS
approved