login
A156535
Triangle, T(n, k, q) = e(n, k, 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 = 2, read by rows.
3
1, 1, 1, 1, -3, 1, 1, 1, -9, 1, 1, -3, -23, 67, 1, 1, 1, -81, -151, 1083, 1, 1, -3, -239, 1403, 9497, -34677, 1, 1, 1, -729, -5103, 126915, 424313, -2219285, 1, 1, -3, -2183, 31347, 1314417, -12971853, -68273223, 284068395, 1, 1, 1, -6561, -139271, 14960139, 230347569, -3765947181, -15406841031, 72721509291, 1
OFFSET
1,5
LINKS
FORMULA
T(n, k, q) = e(n, k, 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 = 2.
EXAMPLE
Triangle begins as:
1;
1, 1;
1, -3, 1;
1, 1, -9, 1;
1, -3, -23, 67, 1;
1, 1, -81, -151, 1083, 1;
1, -3, -239, 1403, 9497, -34677, 1;
1, 1, -729, -5103, 126915, 424313, -2219285, 1;
1, -3, -2183, 31347, 1314417, -12971853, -68273223, 284068395, 1;
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];
Table[T[n, k, 2], {n, 10}, {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 A156535(n, k, q): return e(n, k, q)
flatten([[A156535(n, k, 2) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Jan 03 2022
CROSSREFS
Sequence in context: A343717 A263159 A229142 * A365427 A366787 A348038
KEYWORD
sign,tabl
AUTHOR
Roger L. Bagula, Feb 09 2009
EXTENSIONS
Edited by G. C. Greubel, Jan 03 2022
STATUS
approved