login
A171412
Triangle read by rows (n >= 1): T(n,k) = [x^k] p(x,n), where p(x,n) = (x^3 + x^2 + x + 1)^floor(n/2) if n is odd, and p(x,n) = (x + 1)*p(x,n-1) otherwise.
1
1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 3, 4, 3, 2, 1, 1, 3, 5, 7, 7, 5, 3, 1, 1, 3, 6, 10, 12, 12, 10, 6, 3, 1, 1, 4, 9, 16, 22, 24, 22, 16, 9, 4, 1, 1, 4, 10, 20, 31, 40, 44, 40, 31, 20, 10, 4, 1, 1, 5, 14, 30, 51, 71, 84, 84, 71, 51, 30, 14, 5, 1, 1, 5, 15, 35, 65, 101, 135, 155, 155, 135, 101, 65, 35, 15, 5, 1
OFFSET
1,9
EXAMPLE
Triangle begins:
1;
1, 1;
1, 1, 1, 1;
1, 2, 2, 2, 1;
1, 2, 3, 4, 3, 2, 1;
1, 3, 5, 7, 7, 5, 3, 1;
1, 3, 6, 10, 12, 12, 10, 6, 3, 1;
1, 4, 9, 16, 22, 24, 22, 16, 9, 4, 1;
1, 4, 10, 20, 31, 40, 44, 40, 31, 20, 10, 4, 1;
1, 5, 14, 30, 51, 71, 84, 84, 71, 51, 30, 14, 5, 1;
1, 5, 15, 35, 65, 101, 135, 155, 155, 135, 101, 65, 35, 15, 5, 1;
1, 6, 20, 50, 100, 166, 236, 290, 310, 290, 236, 166, 100, 50, 20, 6, 1;
...
MATHEMATICA
p[x_, n_] := p[x, n] = If[Mod[n, 2] == 0, (x + 1)*p[x, n - 1], (x^3 + x^2 + x + 1)^Floor[n/2]]
Flatten[Table[CoefficientList[p[x, n], x], {n, 1, 12}]]
PROG
(Maxima)
p(x, n) := if mod(n, 2) = 0 then (x + 1)*p(x, n - 1) else (x^3 + x^2 + x + 1)^floor(n/2)$
T(n, k) := ratcoef(p(x, n), x, k)$
create_list(T(n, k), n, 1, 12, k, 0, hipow(fullratsimp(p(x, n)), x));
/* Franck Maminirina Ramaharo, Jan 13 2019 */
CROSSREFS
Row sums: A000079.
Sequence in context: A301562 A334486 A356997 * A248213 A376633 A317682
KEYWORD
nonn,easy,tabf
AUTHOR
Roger L. Bagula, Dec 08 2009
EXTENSIONS
Edited by Franck Maminirina Ramaharo, Jan 13 2019
STATUS
approved