login
A193554
Triangle read by rows: first column: top entry is 1, then powers of 2; rest of triangle is Pascal's triangle A007318.
3
1, 1, 1, 2, 1, 1, 4, 1, 2, 1, 8, 1, 3, 3, 1, 16, 1, 4, 6, 4, 1, 32, 1, 5, 10, 10, 5, 1, 64, 1, 6, 15, 20, 15, 6, 1, 128, 1, 7, 21, 35, 35, 21, 7, 1, 256, 1, 8, 28, 56, 70, 56, 28, 8, 1, 512, 1, 9, 36, 84, 126, 126, 84, 36, 9, 1, 1024, 1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1, 2048, 1, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 1
OFFSET
0,4
COMMENTS
The original definition of A135233 made no sense. In fact A135233 is the binomial transform of the present sequence.
EXAMPLE
Triangle begins:
1;
1, 1;
2, 1, 1;
4, 1, 2, 1;
8, 1, 3, 3, 1;
16, 1, 4, 6, 4, 1;
32, 1, 5, 10, 10, 5, 1;
64, 1, 6, 15, 20, 15, 6, 1;
...
MAPLE
T:= proc(n, k) option remember;
if k=n then 1
elif k=0 then 2^(n-1)
else binomial(n-1, k-1)
fi; end:
seq(seq(T(n, k), k=0..n), n=0..12); # G. C. Greubel, Nov 20 2019
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k==n, 1, If[k==0, 2^(n-1), Binomial[n-1, k-1]]];
Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Nov 20 2019 *)
PROG
(PARI) T(n, k) = if(k==n, 1, if(k==0, 2^(n-1), binomial(n-1, k-1) )); \\ G. C. Greubel, Nov 20 2019
(Magma)
function T(n, k)
if k eq n then return 1;
elif k eq 0 then return 2^(n-1);
else return Binomial(n-1, k-1);
end if; return T; end function;
[T(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 20 2019
(Sage)
@CachedFunction
def T(n, k):
if (k==n): return 1
elif (k==0): return 2^(n-1)
else: return binomial(n-1, k-1)
[[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Nov 20 2019
CROSSREFS
Cf. A000079 (row sums)
Sequence in context: A199856 A301906 A302150 * A372701 A131350 A131087
KEYWORD
nonn,tabl
AUTHOR
N. J. A. Sloane, Jul 30 2011
STATUS
approved