login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Today, Nov 11 2014, is the 4th anniversary of the launch of the new OEIS web site. 70,000 sequences have been added in these four years, all edited by volunteers. Please make a donation (tax deductible in the US) to help keep the OEIS running.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A131423 Row sums of triangle A131422. 9
1, 8, 25, 56, 105, 176, 273, 400, 561, 760, 1001, 1288, 1625, 2016, 2465, 2976, 3553, 4200, 4921, 5720, 6601, 7568, 8625, 9776, 11025, 12376, 13833, 15400, 17081, 18880, 20801, 22848, 25025, 27336, 29785, 32376, 35113, 38000, 41041, 44240, 47601 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

The Wiener index of the P_2 X P_n grid, where P_m is the path graph on m vertices. The Wiener index of a connected graph is the sum of distances between all unordered pairs of vertices in the graph. - Emeric Deutsch, Sep 05 2008

LINKS

Table of n, a(n) for n=1..41.

B. E. Sagan, Y-N. Yeh and P. Zhang, The Wiener Polynomial of a Graph, Internat. J. of Quantum Chem., 60, 1996, 959-969.

D. P. Walsh, Notes on the Wiener index for a simple grid graph

Eric Weisstein, MathWorld: Wiener Index

FORMULA

a(n) = n(n+2)(2n-1)/3. - Emeric Deutsch, Sep 06 2008

a(n) = sum_{k=1..n} k*A143370(n,k). - Emeric Deutsch, Sep 05 2008

a(n) = a(n-1)+2n^2-1. G.f.: x*(1+4*x-x^2)/(1-x)^4. - Dennis P. Walsh, Dec 04 2009

a(1)=0, a(2)=1, a(3)=8, a(4)=25, a(n)=4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4). - Harvey P. Dale, Feb 03 2012

EXAMPLE

a(3) = 25 = sum of row 3 terms, triangle A131422: (6 + 8 + 11).

For n=2, the Wiener index is a(2)=8 since there are 4 vertex pairs with distances of 1 and 2 vertex pairs with distances of 2. - Dennis P. Walsh, Dec 04 2009

MAPLE

seq((1/3)*n*(n+2)*(2*n-1), n=1..43); # Emeric Deutsch, Sep 06 2008

MATHEMATICA

f[n_]:=Sum[2*i^2-1, {i, 1, n}]; Table[f[n], {n, 0, 6!}] (* Vladimir Joseph Stephan Orlovsky, Mar 08 2010 *)

Table[Sum[2k^2-1, {k, n}], {n, 0, 50}] (* or *) LinearRecurrence[{4, -6, 4, -1}, {0, 1, 8, 25}, 50] (* Harvey P. Dale, Feb 03 2012 *)

PROG

(MAGMA) [n*(n+2)*(2*n-1)/3: n in [1..45]]; // Vincenzo Librandi, Nov 02 2014

CROSSREFS

Cf. A131422.

Sequence in context: A062728 A244942 * A143371 A004640 A250321 A011924

Adjacent sequences:  A131420 A131421 A131422 * A131424 A131425 A131426

KEYWORD

nonn

AUTHOR

Gary W. Adamson, Jul 10 2007

EXTENSIONS

More terms from Emeric Deutsch, Sep 06 2008

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified November 28 01:41 EST 2014. Contains 250286 sequences.