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

%I #31 Sep 08 2022 08:45:00

%S 1,2,4,8,11,18,22,32,37,50,56,72,79,98,106,128,137,162,172,200,211,

%T 242,254,288,301,338,352,392,407,450,466,512,529,578,596,648,667,722,

%U 742,800,821,882,904,968,991,1058,1082,1152,1177,1250,1276

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

%C a(n) gives the number of vertices encountered along the shortest walk that encounters every edge at least once on the complete graph with n + 1 vertices. - _Peter Kagey_, Nov 17 2016

%H G. C. Greubel, <a href="/A053439/b053439.txt">Table of n, a(n) for n = 0..5000</a>

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

%F Even: a(2*n)= 2* n^2 +n +1, odd: a(2*n-1)= 2* n^2. - _Frank Ellermann_, Feb 11 2002

%F a(n) = Sum_{k=0..n} binomial(n, k mod 2). - _Paul Barry_, Jul 24 2003

%F a(n) = A128223(n) + 1. - _Peter Kagey_, Nov 17 2016

%F E.g.f.: (1 + x)*((2 + x)*cosh(x) + (1 + x)*sinh(x))/2. - _Ilya Gutkovskiy_, Nov 17 2016

%e G.f. = 1 + 2*x + 4*x^2 + 8*x^3 + 11*x^4 + 18*x^5 + 22*x^6 + 32*x^7 + 37*x^8 + ...

%t CoefficientList[Series[(1+x+2x^3)/((1-x)(1-x^2)^2),{x,0,50}],x] (* or *)

%t LinearRecurrence[{1,2,-2,-1,1},{1,2,4,8,11},50] (* _Harvey P. Dale_, Apr 26 2011 *)

%o (PARI) x='x+O('x^30); Vec((1+x+2*x^3)/((1-x)*(1-x^2)^2)) \\ _G. C. Greubel_, May 26 2018

%o (Magma) I:=[1,2,4,8,11]; [n le 5 select I[n] else Self(n-1) +2*Self(n-2) -2*Self(n-3) -Self(n-4) +self(n-5): n in [1..30]]; // _G. C. Greubel_, May 26 2018

%Y Cf. A128223.

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_, Jan 12 2000