cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A245826 Triangle read by rows: T(m,n) is the Szeged index of the grid graph P_m X P_n (1 <= n <= m).

Original entry on oeis.org

0, 1, 16, 4, 59, 216, 10, 144, 526, 1280, 20, 285, 1040, 2530, 5000, 35, 496, 1809, 4400, 8695, 15120, 56, 791, 2884, 7014, 13860, 24101, 38416, 84, 1184, 4316, 10496, 20740, 36064, 57484, 86016, 120, 1689, 6156, 14970, 29580, 51435, 81984, 122676, 174960, 165, 2320, 8455, 20560, 40625, 70640, 112595, 168480, 240285, 330000
Offset: 1

Views

Author

Emeric Deutsch, Aug 06 2014

Keywords

Comments

T(n,1) = Szeged index of the path tree P_n = A000292(n-1).
T(n,2) = Szeged index of the ladder graph P_2 X P_n = A063521(n).
T(n,3) = Szeged index of the grid graph P_3 X P_n = A245827(n).
T(n,n) = Szeged index of the grid graph P_n X P_n = A245828(n).

Examples

			T(2,2) = 16 because P_2 X P_2 is the square C_4 and each of its 4 edges contributes 2*2=4 to its Szeged index.
Triangle starts:
0;
1,16;
4,59,216;
10,144,526,1280;
20,285,1040,2530,5000;
		

Crossrefs

Cf. A245940 (row sums), A245941 (central terms).

Programs

  • Haskell
    a245826 n k = n * k * (2 * n^2 * k^2 - n^2 - k^2) `div` 6
    a245826_row n = map (a245826 n) [1..n]
    a245826_tabl = map a245826_row [1..]
    -- Reinhard Zumkeller, Aug 07 2014
  • Maple
    T:=proc(m,n) options operator, arrow: (1/6)*m*n*(2*m^2*n^2-m^2-n^2) end proc: for m to 12 do seq(T(m, n), n = 1 .. m) end do; # yields sequence in triangular form
  • Mathematica
    T[m_, n_] := (1/6)*m*n*(2*m^2*n^2 - m^2 - n^2); Table[T[m, n], {m, 1, 12}, {n, 1, m}] // Flatten (* Jean-François Alcover, Feb 09 2018 *)

Formula

T(m,n) = mn(2m^2 n^2 - m^2 - n^2)/6. See the Klavzar et al. reference; p. 47, line 6; there is a typo: n^2 - m^2 should be n^2 + m^2.

A143945 Wiener index of the grid P_n x P_n, where P_n is the path graph on n vertices.

Original entry on oeis.org

0, 8, 72, 320, 1000, 2520, 5488, 10752, 19440, 33000, 53240, 82368, 123032, 178360, 252000, 348160, 471648, 627912, 823080, 1064000, 1358280, 1714328, 2141392, 2649600, 3250000, 3954600, 4776408, 5729472, 6828920, 8091000, 9533120, 11173888, 13033152, 15132040
Offset: 1

Views

Author

Emeric Deutsch, Sep 20 2008

Keywords

Comments

The Wiener index of a connected graph is the sum of the distances between all unordered pairs of vertices in the graph.

Examples

			a(2)=8 because in P_2 x P_2 (a square) there are 4 distances equal to 1 and 2 distances equal to 2 (4*1 + 2*2 = 8).
		

Crossrefs

Main diagonal of A143368.

Programs

  • Magma
    [n^3*(n^2-1)/3: n in [1..40]]; // Vincenzo Librandi, Feb 08 2014
    
  • Maple
    seq((1/3)*n^3*(n^2-1),n=1..33);
  • Mathematica
    Table[n^3 (n^2 - 1)/3, {n, 40}] (* Harvey P. Dale, Feb 07 2014 *)
    LinearRecurrence[{6, -15, 20, -15, 6, -1}, {0, 8, 72, 320, 1000, 2520}, 30] (* Harvey P. Dale, Feb 07 2014 *)
    CoefficientList[Series[8 x (1 + 3 x + x^2)/(x - 1)^6, {x, 0, 40}], x] (* Vincenzo Librandi, Feb 08 2014 *)
  • PARI
    a(n)=n^3*(n^2-1)/3 \\ Charles R Greathouse IV, Oct 21 2022

Formula

a(n) = Sum_{k=1..2n-2} k*A143944(n,k).
a(n) = n^3*(n^2-1)/3.
a(n) = 8*A006414(n-2). G.f.: 8*x^2*(1+3*x+x^2)/(x-1)^6. - R. J. Mathar, Sep 15 2010
a(n) = 6*a(n-1)-15*a(n-2)+20*a(n-3)-15*a(n-4)+6*a(n-5)-a(n-6), a(2)=8, a(3)=72, a(4)=320, a(5)=1000, a(6)=2520, a(7)=5488. - Harvey P. Dale, Feb 07 2014
From Amiram Eldar, Jan 09 2022: (Start)
Sum_{n>=2} 1/a(n) = 15/4 - 3*zeta(3).
Sum_{n>=2} (-1)^n/a(n) = 9*zeta(3)/4 + 6*log(2) - 27/4. (End)

A245827 Szeged index of the grid graph P_3 X P_n.

Original entry on oeis.org

4, 59, 216, 526, 1040, 1809, 2884, 4316, 6156, 8455, 11264, 14634, 18616, 23261, 28620, 34744, 41684, 49491, 58216, 67910, 78624, 90409, 103316, 117396, 132700, 149279, 167184, 186466, 207176, 229365, 253084, 278384, 305316, 333931, 364280, 396414, 430384, 466241, 504036, 543820
Offset: 1

Views

Author

Emeric Deutsch, Aug 06 2014

Keywords

Crossrefs

Programs

  • Magma
    [(1/2)*n*(17*n^2 - 9): n in [1..40]]; // Vincenzo Librandi, Aug 07 2014
  • Maple
    a := proc (n) options operator, arrow: (1/2)*n*(17*n^2-9) end proc: seq(a(n), n = 1 .. 40);
  • Mathematica
    CoefficientList[Series[(4 x^2 + 43 x + 4)/(x - 1)^4, {x, 0, 40}], x] (* Vincenzo Librandi, Aug 07 2014 *)
    LinearRecurrence[{4,-6,4,-1},{4,59,216,526},40] (* Harvey P. Dale, Oct 21 2017 *)
  • PARI
    Vec(x*(4*x^2+43*x+4)/(x-1)^4 + O(x^100)) \\ Colin Barker, Aug 07 2014
    

Formula

a(n) = (1/2)*n*(17*n^2 - 9).
a(n) = A245826(n, 3).
a(n) = 4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4). G.f.: x*(4*x^2+43*x+4) / (x-1)^4. - Colin Barker, Aug 07 2014
Showing 1-3 of 3 results.