OFFSET
0,12
COMMENTS
Row sums are: 1, 2, 3, 4, 8, 6, 12, 8, 16, 32, 64, 12, 24, 14, 28, 56,...
EXAMPLE
1;
1, 1;
1, 1, 1;
1, 1, 1, 1;
1, 2, 2, 2, 1;
1, 1, 1, 1, 1, 1;
1, 2, 2, 2, 2, 2, 1;
1, 1, 1, 1, 1, 1, 1, 1;
1, 2, 2, 2, 2, 2, 2, 2, 1;
1, 3, 4, 4, 4, 4, 4, 4, 3, 1;
1, 4, 7, 8, 8, 8, 8, 8, 7, 4, 1;
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1;
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1;
1, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 1;
MATHEMATICA
Clear[p, x, n, a];
p[x, 0] = 1; p[x, 1] = ((x + 1)); p[x, 2] = ((x^2 + x + 1));
p[x_, n_] := p[x, n] = If[PrimeQ[n], Sum[x^i, {i, 0, n}], (x + 1)*p[x, n - 1]];
a = Table[CoefficientList[FullSimplify[p[x, n]], x], {n, 0, 15}];
Flatten[a]
CROSSREFS
KEYWORD
AUTHOR
Roger L. Bagula, Feb 27 2009
STATUS
approved