login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A180861
Wiener index of the n-pan graph.
1
1, 4, 8, 16, 26, 42, 61, 88, 119, 160, 206, 264, 328, 406, 491, 592, 701, 828, 964, 1120, 1286, 1474, 1673, 1896, 2131, 2392, 2666, 2968, 3284, 3630, 3991, 4384, 4793, 5236, 5696, 6192, 6706, 7258, 7829, 8440, 9071, 9744, 10438, 11176, 11936, 12742, 13571, 14448
OFFSET
1,2
COMMENTS
The n-pan graph is obtained by joining with an edge a node in the cycle graph C_n to the singleton graph P_1. The Wiener index of a connected graph is the sum of distances between all unordered pairs of vertices in the graph.
The n-pan graph is a special case of the tadpole graph.
Extended to a(1)-a(2) using the formula/recurrence.
LINKS
Eric Weisstein's World of Mathematics, Pan Graph
Eric Weisstein's World of Mathematics, Tadpole Graph
Eric Weisstein's World of Mathematics, Wiener Index
FORMULA
a(n) = A180860(n,1) for n>2.
a(n) = (1/8)*n*(n^2 + 2*n + 8) if n is even; a(n) = (1/8)*(n^3 + 2*n^2 + 7*n - 2) if n is odd.
From R. J. Mathar, Sep 29 2010: (Start)
a(n) = +2*a(n-1) +a(n-2) -4*a(n-3) +a(n-4) +2*a(n-5) -a(n-6).
G.f.: x*(1 + 2*x - x^2 + x^4)/((1 - x)^4*(1 + x)^2). (End)
a(n) = (-2 + 15*n + 4*n^2 + 2*n^3 + (-1)^n*(2 + n))/16. - Eric W. Weisstein, Sep 08 2017
EXAMPLE
a(3)=8 because the graph consists of a triangle ABCA and an edge AD; the distances are d(A,B)=d(B,C)=d(C,A)=d(A,D)=1 and d(DB)=d(DC)=2.
MAPLE
a := proc (n) if `mod`(n, 2) = 0 then (1/8)*n*(n^2+2*n+8) else (1/8)*n^3+(1/4)*n^2+(7/8)*n-1/4 end if end proc: seq(a(n), n = 1 .. 50);
MATHEMATICA
LinearRecurrence[{2, 1, -4, 1, 2, -1}, {1, 4, 8, 16, 26, 42}, 50] (* Harvey P. Dale, Jun 04 2015 *)
Table[(-2 + 15 n + 4 n^2 + 2 n^3 + (-1)^n (2 + n))/16, {n, 20}] (* Eric W. Weisstein, Sep 08 2017 *)
CoefficientList[Series[(1 + 2 x - x^2 + x^4)/((1 - x)^4 (1 + x)^2), {x, 0, 20}], x] (* Eric W. Weisstein, Sep 08 2017 *)
CROSSREFS
First column of A180860.
Sequence in context: A138501 A096296 A331243 * A353316 A068936 A345329
KEYWORD
nonn,easy
AUTHOR
Emeric Deutsch, Sep 27 2010
EXTENSIONS
a(1)-a(2) and new offset from Eric W. Weisstein, Sep 08 2017
STATUS
approved