%I M4396 N1852 #34 Sep 08 2022 08:44:31
%S 1,7,29,94,263,667,1577,3538,7622,15900,32314,64274,125561,241569,
%T 458715,861242,1601081,2950693,5396209,9801012,17692092,31759800,
%U 56727588,100861716,178585489,314995915,553650761,969967510,1694235803
%N Arrays of dumbbells.
%D I. P. Goulden and D. M. Jackson, Combinatorial Enumeration, Wiley, N.Y., 1983,(2.3.14).
%D R. C. Grimson, Exact formulas for 2 x n arrays of dumbbells, J. Math. Phys., 15 (1974), 214-216.
%D R. B. McQuistan and S. J. Lichtman, Exact recursion relation for 2 x N arrays of dumbbells, J. Math. Phys., 11 (1970), 3095-3099.
%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H Reinhard Zumkeller, <a href="/A002941/b002941.txt">Table of n, a(n) for n = 1..1000</a>
%H R. C. Grimson, <a href="/A002889/a002889.pdf">Exact formulas for 2 x n arrays of dumbbells</a>, J. Math. Phys., 15.2 (1974), 214-216. (Annotated scanned copy)
%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (5,-7,-2,10,-2,-5,1,1).
%F G.f.: (1+x)^2/((1-x-x^2)^3*(1-x)^2).
%F a(n) = 2*a(n-1) - a(n-3) + A002940(n) + A002940(n-1).
%t CoefficientList[(1+x)^2/((1-x-x^2)^3*(1-x)^2) + O[x]^30, x] (* _Jean-François Alcover_, Jul 31 2018 *)
%t LinearRecurrence[{5,-7,-2,10,-2,-5,1,1},{1,7,29,94,263,667,1577,3538},30] (* _Harvey P. Dale_, Aug 29 2021 *)
%o (Haskell)
%o a002941 n = a002941_list !! (n-1)
%o a002941_list = 1 : 7 : 29 : zipWith (+)
%o (zipWith (-) (map (* 2) $ drop 2 a002941_list) a002941_list)
%o (drop 2 $ zipWith (+) (tail a002940_list) a002940_list)
%o -- _Reinhard Zumkeller_, Jan 18 2014
%o (PARI) x='x+O('x^30); Vec((1+x)^2/((1-x-x^2)^3*(1-x)^2)) \\ _Altug Alkan_, Jul 31 2018
%o (Magma) m:=30; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!( (1+x)^2/((1-x-x^2)^3*(1-x)^2) )); // _G. C. Greubel_, Jan 31 2019
%o (Sage) ((1+x)^2/((1-x-x^2)^3*(1-x)^2)).series(x, 30).coefficients(x, sparse=False) # _G. C. Greubel_, Jan 31 2019
%Y Cf. A046741, A002940, A002889, A055608, A062123-A062127.
%K nonn,easy
%O 1,2
%A _N. J. A. Sloane_
%E More terms from _Henry Bottomley_, Jun 02 2000