[go: up one dir, main page]

login
A156539
Triangle T(n, k, q) = e(n, k, q), where e(n, k, q) = ((1 - (-q)^(n+k-1))/(1 + q))*e(n-1, k, q) + (-q)^(n+k-2)*e(n-1, k-1, q), e(n, 0, q) = e(n, n, q) = 1, and q = 2, read by rows.
3
1, 1, 1, 1, -13, 1, 1, -127, 395, 1, 1, 2635, 8857, -50645, 1, 1, 113369, -1090125, -6392903, 25929899, 1, 1, -9636493, -157388911, 2738123923, 11163788345, -53104434517, 1, 1, -1647840047, 58603503067, 1708972394545, -20846248885229, -99301333604807, 435031527557803, 1
OFFSET
1,5
LINKS
FORMULA
T(n, k, q) = e(n, k, q), where e(n, k, q) = ((1 - (-q)^(n+k-1))/(1 + q))*e(n-1, k, q) + (-q)^(n+k-2)*e(n-1, k-1, q), e(n, 0, q) = e(n, n, q) = 1, and q = 2.
EXAMPLE
Triangle begins as:
1;
1, 1;
1, -13, 1;
1, -127, 395, 1;
1, 2635, 8857, -50645, 1;
1, 113369, -1090125, -6392903, 25929899, 1;
1, -9636493, -157388911, 2738123923, 11163788345, -53104434517, 1;
MATHEMATICA
e[n_, k_, q_]:= e[n, k, q]= If[k<0 || k>n, 0, If[k==1 || k==n, 1, ((1-(-q)^(n+k-1))/(1+q))*e[n-1, k, q] + (-q)^(n+k-2)*e[n-1, k-1, q] ]];
T[n_, k_, q_]:= e[n, k, q];
Table[T[n, k, 2], {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)^(n+k-1))/(1+q))*e(n-1, k, q) + (-q)^(n+k-2)*e(n-1, k-1, q)
def T(n, k, q): return e(n, k, q)
flatten([[T(n, k, 2) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Jan 03 2022
CROSSREFS
Sequence in context: A174694 A353952 A340432 * A172300 A022176 A188646
KEYWORD
sign,tabl
AUTHOR
Roger L. Bagula, Feb 09 2009
EXTENSIONS
Edited by G. C. Greubel, Jan 03 2022
STATUS
approved