login
A180857
Wiener index of the Moebius ladder M(n).
2
1, 6, 21, 44, 85, 138, 217, 312, 441, 590, 781, 996, 1261, 1554, 1905, 2288, 2737, 3222, 3781, 4380, 5061, 5786, 6601, 7464, 8425, 9438, 10557, 11732, 13021, 14370, 15841, 17376, 19041, 20774, 22645, 24588, 26677, 28842, 31161, 33560, 36121, 38766, 41581, 44484
OFFSET
1,2
COMMENTS
The Wiener index of a connected graph is the sum of distances between all unordered pairs of vertices in the graph.
Extended to a(1)-a(2) using the formula/recurrence. - Eric W. Weisstein, Sep 08 2017
REFERENCES
N. Biggs, Algebraic Graph Theory, 2nd ed. Cambridge University Press, 1993.
LINKS
Indranil Ghosh, Table of n, a(n) for n = 1..1000 (corrected by Ray Chandler, Jan 19 2019)
B. E. Sagan, Y-N. Yeh, and P. Zhang, The Wiener Polynomial of a Graph, Internat. J. of Quantum Chem., 60, 1996, 959-969.
Eric Weisstein's World of Mathematics, Moebius Ladder
Eric Weisstein's World of Mathematics, Wiener Index
FORMULA
a(n) = Sum_{k>=1} k*A180856(n,k).
a(n) = n*(n^2 + 2*n - 2)/2 if n is even;
a(n) = n*(n^2 + 2*n - 1)/2 if n is odd.
a(n) = n*(-3-(-1)^n+4*n+2*n^2)/4. - Colin Barker, Oct 31 2012
G.f.: x*(1 + 4 x + 8 x^2 - x^4)/((-1 + x)^4*(1 + x)^2). - Colin Barker, Oct 31 2012
E.g.f.: x*((2 + 5*x + x^2)*cosh(x) + (1 + 5*x + x^2)*sinh(x))/2. - Stefano Spezia, May 30 2023
EXAMPLE
a(4) = 4*(-3-(-1)^4+4*4+2*4^2)/4 = -3-1+16+32 = 44. - Indranil Ghosh, Feb 24 2017
MAPLE
a := proc (n) if `mod`(n, 2) = 0 then (1/2)*n*(n^2+2*n-2) else (1/2)*n*(n^2+2*n-1) end if end proc: seq(a(n), n = 3 .. 45);
MATHEMATICA
(* Start from Indranil Ghosh, Feb 24 2017 *)
Table[n (-3 - (-1)^n + 4 n + 2 n^2)/4, {n, 40}]
CoefficientList[Series[(1 + 4 x + 8 x^2 - x^4)/((-1 + x)^4 (1 + x)^2), {x, 0, 40}], x]
LinearRecurrence[{2, 1, -4, 1, 2, -1}, {1, 6, 21, 44, 85, 138}, 40]
(* End *)
PROG
(PARI) a(n) = n*(-3-(-1)^n+4*n+2*n^2)/4 \\ Indranil Ghosh, Feb 24 2017
(Python)
def A180857(n):
return n*(-3-(-1)**n+4*n+2*n**2)//4 # Indranil Ghosh, Feb 24 2017
CROSSREFS
Cf. A180856.
Sequence in context: A272671 A272684 A180863 * A119868 A175729 A081266
KEYWORD
nonn,easy
AUTHOR
Emeric Deutsch, Sep 24 2010
EXTENSIONS
a(1)-a(2) from Eric W. Weisstein, Sep 08 2017
STATUS
approved