Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #5 Oct 12 2012 14:54:57
%S 1,1,1,1,4,1,1,5,5,1,1,8,18,8,1,1,9,26,26,9,1,1,12,51,88,51,12,1,1,13,
%T 63,139,139,63,13,1,1,16,100,304,454,304,100,16,1,1,17,116,404,758,
%U 758,404,116,17,1,1,20,165,720,1770,2424,1770,720,165,20,1,1,21,185,885
%N Triangle T(n,k) of the coefficients [x^k] of the polynomial p_n(x), where p_n(x)=(1+x)*p_{n-1}(x) if n even, p_n(x) = (x^2+4x+1)^((n-1)/2) if n odd.
%C Row sums are apparently in A026549.
%e The triangle starts in row n=1 with column 0<=k<n as:
%e 1;
%e 1, 1;
%e 1, 4, 1;
%e 1, 5, 5, 1;
%e 1, 8, 18, 8, 1;
%e 1, 9, 26, 26, 9, 1;
%e 1, 12, 51, 88, 51, 12, 1;
%e 1, 13, 63, 139, 139, 63, 13, 1;
%e 1, 16, 100, 304, 454, 304, 100, 16, 1;
%e 1, 17, 116, 404, 758, 758, 404, 116, 17, 1;
%e 1, 20, 165, 720, 1770, 2424, 1770, 720, 165, 20, 1;
%e 1, 21, 185, 885, 2490, 4194, 4194, 2490, 885, 185, 21, 1;
%p A171142P := proc(n) option remember; if type(n,'even') then (x+1)*procname(n-1) ; else (x^2+4*x+1)^((n-1)/2) ; end if; expand(%) ;end proc:
%p A171142 := proc(n,k) coeff(A171142P(n,x),x,k) ; end proc:
%t Clear[p, n, x, a]
%t w = 4;
%t p[x, 1] := 1;
%t p[x_, n_] := p[x, n] = If[Mod[n, 2] == 0, (x + 1)*p[x, n - 1], (x^2 + w*x + 1)^Floor[n/2]];
%t a = Table[CoefficientList[p[x, n], x], {n, 1, 12}];
%t Flatten[a]
%Y Cf. A051159, A169623, A007318
%K nonn,tabl
%O 1,5
%A _Roger L. Bagula_ and _Gary W. Adamson_, Dec 04 2009