login
A154221
A simple Pascal-like triangle.
3
1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 5, 5, 5, 1, 1, 9, 9, 9, 9, 1, 1, 17, 17, 17, 17, 17, 1, 1, 33, 33, 33, 33, 33, 33, 1, 1, 65, 65, 65, 65, 65, 65, 65, 1, 1, 129, 129, 129, 129, 129, 129, 129, 129, 1, 1, 257, 257, 257, 257, 257, 257, 257, 257, 257, 1
OFFSET
0,5
COMMENTS
First column is A094373. Central coefficients are A123166.
Row sums are A154222. Diagonal sums are A154223.
FORMULA
T(n,k)= 1 + (2^(k-1)-0^k/2)*(2^(n-k-1)-0^(n-k)/2).
EXAMPLE
Triangle begins
1,
1, 1,
1, 2, 1,
1, 3, 3, 1,
1, 5, 5, 5, 1,
1, 9, 9, 9, 9, 1,
1, 17, 17, 17, 17, 17, 1,
1, 33, 33, 33, 33, 33, 33, 1,
1, 65, 65, 65, 65, 65, 65, 65, 1
MAPLE
A154221 := proc(n, k)
local f1, f2 ;
f1 := 2^(k-1) ;
if k = 0 then
f1 := f1-1/2 ;
end if;
f2 := 2^(n-k-1) ;
if n-k = 0 then
f2 := f2-1/2 ;
end if;
1+f1*f2 ;
end proc:
seq(seq(A154221(n, k), k=0..n), n=0..10) ; # R. J. Mathar, Feb 05 2015
MATHEMATICA
f[n_, k_] := 1 + (1/4)*(2^(k) - 0^k)*(2^(n - k) - 0^(n - k)); Table[f[n, i], {n, 0, 49}, {i, 0, n}] // Flatten (* G. C. Greubel, Sep 06 2016 *)
PROG
(Magma) /* As triangle */ [[1+(2^(k-1)-0^k/2)*(2^(n-k-1)-0^(n-k)/2): k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Sep 06 2016
CROSSREFS
Sequence in context: A235803 A138201 A220614 * A026736 A230859 A213086
KEYWORD
easy,nonn,tabl
AUTHOR
Paul Barry, Jan 05 2009
STATUS
approved