login
A152714
Triangle read by rows: T(n,k) = 3^min(k, n-k).
5
1, 1, 1, 1, 3, 1, 1, 3, 3, 1, 1, 3, 9, 3, 1, 1, 3, 9, 9, 3, 1, 1, 3, 9, 27, 9, 3, 1, 1, 3, 9, 27, 27, 9, 3, 1, 1, 3, 9, 27, 81, 27, 9, 3, 1, 1, 3, 9, 27, 81, 81, 27, 9, 3, 1, 1, 3, 9, 27, 81, 243, 81, 27, 9, 3, 1
OFFSET
0,5
FORMULA
T(n,k) = 3^min(k, n-k) = 3^A004197(n,k). - Philippe Deléham, Feb 25 2014
EXAMPLE
Triangle begins
{1},
{1, 1},
{1, 3, 1},
{1, 3, 3, 1},
{1, 3, 9, 3, 1},
{1, 3, 9, 9, 3, 1},
{1, 3, 9, 27, 9, 3, 1},
{1, 3, 9, 27, 27, 9, 3, 1},
{1, 3, 9, 27, 81, 27, 9, 3, 1},
{1, 3, 9, 27, 81, 81, 27, 9, 3, 1},
{1, 3, 9, 27, 81, 243, 81, 27, 9, 3, 1}
MATHEMATICA
Clear[a, k, m]; k = 3; a[0] = {1}; a[1] = {1, 1};
a[n_] := a[n] = Join[{1}, k*a[n - 2], {1}];
Table[a[n], {n, 0, 10}];
Flatten[%]
Table[3^(Min[k, n - k]), {n, 0, 100}, {k, 0, n}] // Flatten (* G. C. Greubel, Sep 01 2018 *)
PROG
(PARI) for(n=0, 15, for(k=0, n, print1(3^(min(k, n-k)), ", "))) \\ G. C. Greubel, Sep 01 2018
(Magma) [[3^(Min(k, n-k)): k in [0..n]]: n in [0..15]]; // G. C. Greubel, Sep 01 2018
CROSSREFS
Cf. A004197, A144464, A152716, A152717, A062318 (row sums).
Sequence in context: A106255 A143086 A327481 * A174546 A134444 A176149
KEYWORD
nonn,easy,tabl
AUTHOR
EXTENSIONS
Better name by Philippe Deléham, Feb 25 2014
STATUS
approved