login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A156538
Triangle T(n, k, q) = e(n, k, q) + e(n, n-k+1, q), where e(n, k, q) = ((1 - (-q)^k)/(1 + q))*e(n-1, k, q) + (-q)^(k-1)*e(n-1, k-1, q), e(n, 0, q) = e(n, n, q) = 1, and q = 3, read by rows.
3
2, 2, 2, 2, -10, 2, 2, -31, -31, 2, 2, 989, -406, 989, 2, 2, 81578, -16213, -16213, 81578, 2, 2, -19816168, 3777869, 670556, 3777869, -19816168, 2, 2, -14445938413, 2685823244, 251846999, 251846999, 2685823244, -14445938413, 2
OFFSET
1,1
LINKS
FORMULA
T(n, k, q) = e(n, k, q) + e(n, n-k+1, q), where e(n, k, q) = ((1 - (-q)^k)/(1 + q))*e(n-1, k, q) + (-q)^(k-1)*e(n-1, k-1, q), e(n, 0, q) = e(n, n, q) = 1, and q = 3.
EXAMPLE
Triangle begins as:
2;
2, 2;
2, -10, 2;
2, -31, -31, 2;
2, 989, -406, 989, 2;
2, 81578, -16213, -16213, 81578, 2;
2, -19816168, 3777869, 670556, 3777869, -19816168, 2;
2, -14445938413, 2685823244, 251846999, 251846999, 2685823244, -14445938413, 2;
MATHEMATICA
e[n_, k_, q_]:= e[n, k, q]= If[k<0 || k>n, 0, If[k==1 || k==n, 1, ((1-(-q)^k)/(1+q))*e[n-1, k, q] + (-q)^(k-1)*e[n-1, k-1, q] ]];
T[n_, k_, q_]:= e[n, k, q] + e[n, n-k+1, q];
Table[T[n, k, 3], {n, 12}, {k, n}]//Flatten (* modified by G. C. Greubel, Jan 03 2022 *)
PROG
(Sage)
def e(n, k, q):
if (k<0 or k>n): return 0
elif (k==1 or k==n): return 1
else: return ((1-(-q)^k)/(1+q))*e(n-1, k, q) + (-q)^(k-1)*e(n-1, k-1, q)
def A156538(n, k, q): return e(n, k, q) + e(n, n-k+1, q)
flatten([[A156538(n, k, 3) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Jan 03 2022
CROSSREFS
Sequence in context: A085056 A371619 A265447 * A249768 A217503 A165466
KEYWORD
sign,tabl
AUTHOR
Roger L. Bagula, Feb 09 2009
EXTENSIONS
Edited by G. C. Greubel, Jan 03 2022
STATUS
approved