A005996 G.f.: 2*(1-x^3)/((1-x)^5*(1+x)^2).
2, 6, 16, 30, 54, 84, 128, 180, 250, 330, 432, 546, 686, 840, 1024, 1224, 1458, 1710, 2000, 2310, 2662, 3036, 3456, 3900, 4394, 4914, 5488, 6090, 6750, 7440, 8192, 8976, 9826, 10710, 11664, 12654, 13718, 14820, 16000, 17220, 18522, 19866, 21296, 22770, 24334
Offset: 1
References
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- Enrique Pérez Herrero, Table of n, a(n) for n = 1..1000
- S. M. Losanitsch, Die Isomerie-Arten bei den Homologen der Paraffin-Reihe, Chem. Ber. 30 (1897), pp. 1917-1926.
- S. M. Losanitsch, Die Isomerie-Arten bei den Homologen der Paraffin-Reihe, Chem. Ber. 30 (1897), 1917-1926. (Annotated scanned copy)
- Eric Weisstein's World of Mathematics, Longest Path Problem
- Eric Weisstein's World of Mathematics, Web Graph
- Index entries for linear recurrences with constant coefficients, signature (2,1,-4,1,2,-1).
Crossrefs
Essentially twice A034828.
Programs
-
Mathematica
Table[(1/4)*(1 + n)*(-2 + 5*n + n^2 + 2*Ceiling[1/2 - n/2] - 4*Floor[n/2]), {n, 1, 200}] (* Enrique Pérez Herrero, Aug 03 2012 *) CoefficientList[Series[2 (1 - x^3)/((1 - x)^5 (1 + x)^2), {x, 0, 40}], x] (* Harvey P. Dale, Apr 08 2013 *) LinearRecurrence[{2, 1, -4, 1, 2, -1}, {2, 6, 16, 30, 54, 84}, 40] (* Harvey P. Dale, Apr 08 2013 *) Table[(n + 1) (2 n (n + 2) + 1 - (-1)^n)/8, {n, 20}] (* Eric W. Weisstein, Mar 27 2018 *)
Formula
a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6), with a(1)=2, a(2)=6, a(3)=16, a(4)=30, a(5)=54, a(6)=84. - Harvey P. Dale, Apr 08 2013
From Ayoub Saber Rguez, Nov 20 2021: (Start)
a(n) = (n^3 + 3*n^2 + 2*n + 1 + n*(n mod 2) - ((n+1) mod 2))/4. (End)
Extensions
Edited by N. J. A. Sloane, Aug 03 2012
Comments