%I #23 Sep 08 2022 08:45:38
%S 0,1,9,34,91,192,353,584,903,1318,1849,2502,3299,4244,5361,6652,8143,
%T 9834,11753,13898,16299,18952,21889,25104,28631,32462,36633,41134,
%U 46003,51228,56849,62852,69279,76114,83401,91122,99323,107984,117153,126808
%N G.f.: x*(1+x+x^2)*(1+6*x+8*x^2+4*x^3-x^4)/((1+x)^2*(1-x)^4).
%C The inverse Motzkin transform of A057586, which means that the substitution x -> x*A001006(x) for the independent variable in the g.f. yields the g.f. of A057586.
%H Vincenzo Librandi, <a href="/A147691/b147691.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (2,1,-4,1,2,-1).
%F a(n) = 2*a(n-1) +a(n-2) -4*a(n-3) +a(n-4) +2*a(n-5) -a(n-6), n> 7.
%F a(n) = (3*n*(6*n^2-12*n+13)+(n-2)*(-1)^n-6)/8 for n>1, a(0)=0, a(1)=1. [_Bruno Berselli_, Dec 11 2012]
%t CoefficientList[Series[x (1 + x + x^2) (1 + 6 x + 8 x^2 + 4 x^3 - x^4)/((1 + x)^2 (1 - x)^4), {x, 0, 50}], x] (* _Vincenzo Librandi_, Dec 11 2012 *)
%t LinearRecurrence[{2,1,-4,1,2,-1},{0,1,9,34,91,192,353,584},40] (* _Harvey P. Dale_, Jun 23 2017 *)
%o (Magma) I:=[0,1,9,34,91,192,353,584]; [n le 8 select I[n] else 2*Self(n-1)+Self(n-2)-4*Self(n-3)+Self(n-4)+2*Self(n-5)-Self(n-6): n in [1..40]]; // _Vincenzo Librandi_, Dec 11 2012
%K nonn,easy
%O 0,3
%A _R. J. Mathar_, Nov 10 2008
|