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”).

A156862
Triangle read by rows: T(n, k) = 2^k - binomial(n, k+1) + 2^(n-k) - binomial(n, n-k+1).
1
2, 2, 2, 3, 2, 3, 6, 2, 2, 6, 13, 3, 0, 3, 13, 28, 7, -3, -3, 7, 28, 59, 18, -6, -14, -6, 18, 59, 122, 44, -6, -32, -32, -6, 44, 122, 249, 101, 4, -58, -80, -58, 4, 101, 249, 504, 221, 39, -90, -162, -162, -90, 39, 221, 504, 1015, 468, 130, -119, -292, -356, -292, -119, 130, 468, 1015
OFFSET
0,1
COMMENTS
Row sums are 2^(n+1): {2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, ...}.
FORMULA
T(n, k) = 2^k - binomial(n, k+1) + 2^(n-k) - binomial(n, n-k+1).
EXAMPLE
Triangle begins as:
2;
2, 2;
3, 2, 3;
6, 2, 2, 6;
13, 3, 0, 3, 13;
28, 7, -3, -3, 7, 28;
59, 18, -6, -14, -6, 18, 59;
122, 44, -6, -32, -32, -6, 44, 122;
249, 101, 4, -58, -80, -58, 4, 101, 249;
504, 221, 39, -90, -162, -162, -90, 39, 221, 504;
1015, 468, 130, -119, -292, -356, -292, -119, 130, 468, 1015;
MAPLE
f(n, m):= 2^m - binomial(n, m+1); seq(seq( f(n, k) + f(n, n-k), k=0..n), n=0..10); # G. C. Greubel, Dec 01 2019
MATHEMATICA
f[n_, m_]:= 2^m - Binomial[n, m+1]; T[n_, k_]:= f[n, k] + f[n, n-k]; Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten
PROG
(PARI) T(n, k) = my(f(n, m)=2^m - binomial(n, m+1)); f(n, k) + f(n, n-k); \\ G. C. Greubel, Dec 01 2019
(Magma)
f:= func< n, m | 2^m - Binomial(n, m+1) >;
[f(n, k)+f(n, n-k): k in [0..n], n in [0..10]]; // G. C. Greubel, Dec 01 2019
(Sage)
def f(n, m): return 2^m - binomial(n, m+1)
def T(n, k): return f(n, k) + f(n, n-k)
[[T(n, k) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Dec 01 2019
(GAP) Flat(List([0..10], n-> List([0..n], k-> 2^k - Binomial(n, k+1) + 2^(n-k) - Binomial(n, n-k+1) ))); # G. C. Greubel, Dec 01 2019
CROSSREFS
Sequence in context: A050142 A092964 A183368 * A318583 A076709 A307774
KEYWORD
sign,tabl
AUTHOR
Roger L. Bagula, Feb 17 2009
STATUS
approved