A171147 The sequence of coefficients of a polynomial recursion: p(x,n)=If[Mod[n, 2] == 0, (x + 1)*p(x, n - 1), (x^2 + (2*n)*x + 1)^Floor[n/2]].
1, 1, 1, 1, 6, 1, 1, 7, 7, 1, 1, 20, 102, 20, 1, 1, 21, 122, 122, 21, 1, 1, 42, 591, 2828, 591, 42, 1, 1, 43, 633, 3419, 3419, 633, 43, 1, 1, 72, 1948, 23544, 108870, 23544, 1948, 72, 1, 1, 73, 2020, 25492, 132414, 132414, 25492, 2020, 73, 1, 1, 110, 4845, 106920
Offset: 1
Examples
{1}, {1, 1}, {1, 6, 1}, {1, 7, 7, 1}, {1, 20, 102, 20, 1}, {1, 21, 122, 122, 21, 1}, {1, 42, 591, 2828, 591, 42, 1}, {1, 43, 633, 3419, 3419, 633, 43, 1}, {1, 72, 1948, 23544, 108870, 23544, 1948, 72, 1}, {1, 73, 2020, 25492, 132414, 132414, 25492, 2020, 73, 1}, {1, 110, 4845, 106920, 1185810, 5367252, 1185810, 106920, 4845, 110, 1}, {1, 111, 4955, 111765, 1292730, 6553062, 6553062, 1292730, 111765, 4955, 111, 1}
Programs
-
Mathematica
Clear[p, n, x, a] p[x, 1] := 1; p[x_, n_] := p[x, n] = If[Mod[n, 2] == 0, (x + 1)*p[x, n - 1], (x^2 + (2*n)*x + 1)^Floor[n/2]]; a = Table[CoefficientList[p[x, n], x], {n, 1, 12}]; Flatten[a]
Formula
p(x,n)=If[Mod[n, 2] == 0, (x + 1)*p(x, n - 1), (x^2 + (2*n)*x + 1)^Floor[n/2]]
Comments