login
Expansion of 2*x^4*(1-2*x+x^4)/((1+x)*(1-2*x)^2*(1-x-x^2)).
3

%I #33 Mar 20 2023 15:16:59

%S 0,0,0,0,2,4,12,26,62,136,302,654,1412,3018,6422,13592,28662,60230,

%T 126212,263810,550222,1145352,2380062,4938078,10230852,21169114,

%U 43749862,90317816,186263462,383769046,790000452,1624890194,3339501662,6858353128,14075255822

%N Expansion of 2*x^4*(1-2*x+x^4)/((1+x)*(1-2*x)^2*(1-x-x^2)).

%H Vincenzo Librandi, <a href="/A219752/b219752.txt">Table of n, a(n) for n = 0..1000</a>

%H M. H. Albert, M. D. Atkinson and Robert Brignall, <a href="http://arxiv.org/abs/1206.3183">The enumeration of three pattern classes</a>, arXiv:1206.3183 [math.CO], (2012), p. 17 (Lemma 4.4).

%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (4,-2,-7,4,4).

%F G.f.: 2*x^4*(1-2*x+x^4)/((1+x)*(1-2*x)^2*(1-x-x^2)).

%F a(n) = 2*A219753(n). - _Bruno Berselli_, Nov 29 2012

%t CoefficientList[Series[2 x^4 (1 - 2 x + x^4)/((1 + x) (1 - 2 x)^2 (1 - x - x^2)), {x, 0, 34}], x] (* _Bruno Berselli_, Nov 30 2012 *)

%t LinearRecurrence[{4,-2,-7,4,4},{0,0,0,0,2,4,12,26,62},40] (* _Harvey P. Dale_, Mar 09 2023 *)

%o (Maxima) makelist(coeff(taylor(2*x^4*(1-2*x+x^4)/((1+x)*(1-2*x)^2*(1-x-x^2)), x, 0, n), x, n), n, 0, 34); /* _Bruno Berselli_, Nov 29 2012 */

%o (Magma) I:=[0, 0, 0, 0, 2, 4, 12, 26, 62]; [n le 9 select I[n] else 4*Self(n-1) - 2*Self(n-2) - 7*Self(n-3) + 4*Self(n-4) + 4*Self(n-5): n in [1..40]]; // _Vincenzo Librandi_, Dec 14 2012

%Y Cf. A219751-A219759, A219837.

%K nonn,easy

%O 0,5

%A _N. J. A. Sloane_, Nov 28 2012