OFFSET
0,5
LINKS
Alois P. Heinz, Rows n = 0..140, flattened
FORMULA
Previous definition: A007318 * a triangle by rows: for n > 0, n zeros followed by 2^n - 1.
Binomial transform of a diagonalized infinite lower triangular matrix with (1, 1, 3, 7, 15, ...) in the main diagonal and the rest zeros.
T(n,k) = |[1/(2^x)^k] 1 + (1-1/2^x)^n - (1-2/2^x)^n|. - Alois P. Heinz, Dec 10 2008
EXAMPLE
First few rows of the triangle:
1;
1, 1;
1, 2, 3;
1, 3, 9, 7;
1, 4, 18, 28, 15;
1, 5, 30, 70, 75, 31;
1, 6, 45, 140, 225, 186, 63;
1, 7, 63, 245, 525, 651, 441, 127;
...
MAPLE
x:= 'x': T:= (n, k)-> `if` (k=0, 1, abs(coeff(expand((1-1/2^x)^n -(1-2/2^x)^n), 1/(2^x)^k))): seq(seq(T(n, k), k=0..n), n=0..12); # Alois P. Heinz, Dec 10 2008
# Alternative:
T := (n, k) -> binomial(n, k)*(2^k - 1 + 0^k):
for n from 0 to 7 do seq(T(n, k), k=0..n) od;
# Or as a recursion:
p := proc(n, m) option remember; if n = 0 then max(1, m) else
(m + x)*p(n - 1, m) - (m + 1)*p(n - 1, m + 1) fi end:
Trow := n -> seq((-1)^k * coeff(p(n, 0), x, n - k), k = 0..n): # Peter Luschny, Jun 23 2023
MATHEMATICA
max = 10; T1 = Table[Binomial[n, k], {n, 0, max}, {k, 0, max}]; T2 = Table[ If[n == k, 2^n-1, 0], {n, 0, max}, {k, 0, max}]; TT = T1.T2 ; T[_, 0]=1; T[n_, k_] := TT[[n+1, k+1]]; Table[T[n, k], {n, 0, max}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 26 2016 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Gary W. Adamson, Oct 19 2007
EXTENSIONS
More terms from Alois P. Heinz, Dec 10 2008
New name using a formula of Yuchun Ji by Peter Luschny, Jun 23 2023
STATUS
approved