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-5 of 5 results.

A245828 Szeged index of the grid graph P_n X P_n.

Original entry on oeis.org

0, 16, 216, 1280, 5000, 15120, 38416, 86016, 174960, 330000, 585640, 988416, 1599416, 2497040, 3780000, 5570560, 8018016, 11302416, 15638520, 21280000, 28523880, 37715216, 49252016, 63590400, 81250000, 102819600, 128963016, 160425216, 198038680, 242730000, 295526720, 357564416, 430094016, 514489360
Offset: 1

Views

Author

Emeric Deutsch, Aug 06 2014

Keywords

Crossrefs

Programs

  • Magma
    [n^4*(n^2-1)/3: n in [1..40]]; // Vincenzo Librandi, Aug 07 2014
  • Maple
    a := proc (n) options operator, arrow: (1/3)*n^4*(n^2-1) end proc: seq(a(n), n = 1 .. 40);
  • Mathematica
    CoefficientList[Series[8 x (1 + x) (2 + 11 x + 2 x^2)/(1 - x)^7, {x, 0, 40}], x] (* Vincenzo Librandi, Aug 07 2014 *)
    Table[(n^4 (n^2-1))/3,{n,40}] (* Harvey P. Dale, Mar 25 2021 *)

Formula

a(n) = (1/3)*n^4*(n^2 - 1).
G.f.: 8*x^2*(1+x)*(2+11*x+2*x^2)/(1-x)^7.
a(n) = A245826(n,n).
a(n) = 4 * A208954(n).
From Amiram Eldar, Jan 09 2022: (Start)
Sum_{n>=2} 1/a(n) = 33/4 - Pi^2/2 - Pi^4/30.
Sum_{n>=2} (-1)^n/a(n) = 7*Pi^4/240 + Pi^2/4 - 21/4. (End)

A143368 Triangle read by rows: T(n,k) is the Wiener index of a k X n grid (i.e., P_k X P_n, where P_m is the path graph on m vertices; 1 <= k <= n).

Original entry on oeis.org

0, 1, 8, 4, 25, 72, 10, 56, 154, 320, 20, 105, 280, 570, 1000, 35, 176, 459, 920, 1595, 2520, 56, 273, 700, 1386, 2380, 3731, 5488, 84, 400, 1012, 1984, 3380, 5264, 7700, 10752, 120, 561, 1404, 2730, 4620, 7155, 10416, 14484, 19440
Offset: 1

Views

Author

Emeric Deutsch, Sep 05 2008

Keywords

Comments

The Wiener index of a connected graph is the sum of distances between all unordered pairs of vertices in the graph.
This is the lower triangular half of a symmetric square array.

Examples

			Presentation as symmetric square array starts:
======================================================
n\k|   1   2    3    4    5    6     7     8     9
---|--------------------------------------------------
1  |   0   1    4   10   20   35    56    84   120 ...
2  |   1   8   25   56  105  176   273   400   561 ...
3  |   4  25   72  154  280  459   700  1012  1404 ...
4  |  10  56  154  320  570  920  1386  1984  2730 ...
5  |  20 105  280  570 1000 1595  2380  3380  4620 ...
6  |  35 176  459  920 1595 2520  3731  5264  7155 ...
7  |  56 273  700 1386 2380 3731  5488  7700 10416 ...
8  |  84 400 1012 1984 3380 5264  7700 10752 14484 ...
9  | 120 561 1404 2730 4620 7155 10416 14484 19440 ...
... - _Andrew Howroyd_, May 27 2017
T(2,2)=8 because in a square we have four distances equal to 1 and two distances equal to 2.
T(2,1)=1 because on the path graph on two vertices there is one distance equal to 1.
T(3,2)=25 because on the P(2) X P(3) graph there are 7 distances equal to 1, 6 distances equal to 2 and 2 distances equal to 3, with 7*1 + 6*2 + 2*3 = 25.
Triangle starts: 0; 1,8; 4,25,72; 10,56,154,320;
		

Crossrefs

Cf. A180569 (row 3), A131423 (row 2).
Main diagonal is A143945.
Cf. A245826.

Programs

  • Maple
    T:=proc(n, k) options operator, arrow: (1/6)*k*n*(n+k)*(k*n-1) end proc: for n to 9 do seq(T(n,k),k=1..n) end do; # yields sequence in triangular form
  • Mathematica
    Table[k n (n + k) (k n - 1)/6, {n, 9}, {k, n}] // Flatten (* Michael De Vlieger, May 28 2017 *)
  • PARI
    T(n,k)=k*n*(n+k)*(k*n-1)/6;
    for (n=1,8,for(k=1,8,print1(T(n,k),", "));print) \\ Andrew Howroyd, May 27 2017

Formula

T(n,k) = k*n*(n+k)*(k*n-1)/6 (k, n >= 1).

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

A245940 (2n^7 + 4n^6 - n^5 - 4n^4 - n^3) / 24.

Original entry on oeis.org

0, 0, 17, 279, 1960, 8875, 30555, 87122, 216384, 483570, 994125, 1909985, 3469752, 6013189, 10010455, 16096500, 25111040, 38144532, 56590569, 82205115, 117173000, 164182095, 226505587, 308092774, 413668800, 548843750, 720231525, 935578917, 1203905304
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 07 2014

Keywords

Comments

For n > 0: sum of n-th row of triangle A245826.

Programs

  • Haskell
    a245940 n = n^3 * (2 * n^3 + 2 * n^2 - 3 * n - 1) * (n + 1) `div` 24
    
  • Magma
    [(2*n^7 + 4*n^6 - n^5 - 4*n^4 - n^3) / 24: n in [0..30]] // Vincenzo Librandi, Aug 09 2014
  • Maple
    A245940:=n->(2*n^7 + 4*n^6 - n^5 - 4*n^4 - n^3) / 24: seq(A245940(n), n=0..30); # Wesley Ivan Hurt, Aug 09 2014
  • Mathematica
    Table[(2 n^7 + 4 n^6 - n^5 - 4 n^4 - n^3)/24, {n, 0, 30}] (* Vincenzo Librandi, Aug 09 2014 *)
    LinearRecurrence[{8,-28,56,-70,56,-28,8,-1},{0,0,17,279,1960,8875,30555,87122},30] (* Harvey P. Dale, Apr 19 2018 *)
  • PARI
    concat([0,0], Vec(x^2*(x^4+55*x^3+204*x^2+143*x+17)/(x-1)^8 + O(x^100))) \\ Colin Barker, Aug 08 2014
    

Formula

a(n) = n^3*(2*n^3 + 2*n^2 - 3*n - 1)*(n + 1)/24 = n^3*(n - 1)*(n + 1)*(2*n^2 + 4*n + 1)/24.
G.f.: x^2*(x^4 + 55*x^3 + 204*x^2 + 143*x + 17) / (x - 1)^8. - Colin Barker, Aug 08 2014

A245941 (16n^6 - 24n^5 + 2n^4 + 11n^3 - 6n^2 + n) / 6.

Original entry on oeis.org

0, 0, 59, 1040, 7014, 29580, 94105, 247884, 570220, 1184424, 2271735, 4087160, 6977234, 11399700, 17945109, 27360340, 40574040, 58723984, 83186355, 115606944, 157934270, 212454620, 281829009, 369132060, 477892804, 612137400, 776433775, 975938184, 1216443690
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 07 2014

Keywords

Comments

For n > 0: a(n) = A245826(2*n-1,n), central terms of triangle A245826.

Programs

  • Haskell
    a245941 n = n * (16*n^5 - 24*n^4 + 2*n^3 + 11*n^2 - 6*n + 1) `div` 6
    
  • Magma
    [(16*n^6-24*n^5+2*n^4+11*n^3-6*n^2+n)/6: n in [0..30]] // Vincenzo Librandi, Aug 09 2014
  • Maple
    A245941:=n->(16*n^6-24*n^5+2*n^4+11*n^3-6*n^2+n)/6: seq(A245941(n), n=0..30); # Wesley Ivan Hurt, Aug 09 2014
  • Mathematica
    Table[(16 n^6 - 24 n^5 + 2 n^4 + 11 n^3 - 6 n^2 + n)/6, {n, 0, 30}] (* Vincenzo Librandi, Aug 09 2014 *)
    LinearRecurrence[{7,-21,35,-35,21,-7,1},{0,0,59,1040,7014,29580,94105},30] (* Harvey P. Dale, Apr 13 2015 *)
  • PARI
    concat([0,0], Vec(-x^2*(4*x^4+257*x^3+973*x^2+627*x+59)/(x-1)^7 + O(x^100))) \\ Colin Barker, Aug 08 2014
    

Formula

G.f.: -x^2*(4*x^4+257*x^3+973*x^2+627*x+59) / (x-1)^7. - Colin Barker, Aug 08 2014
a(n) = (n-1)*n*(2*n-1)*(8*n^3-3*n+1)/6. [Bruno Berselli, Aug 08 2014]
a(0)=0, a(1)=0, a(2)=59, a(3)=1040, a(4)=7014, a(5)=29580, a(6)=94105, a(n)=7*a(n-1)-21*a(n-2)+35*a(n-3)-35*a(n-4)+21*a(n-5)-7*a(n-6)+a(n-7). - Harvey P. Dale, Apr 13 2015
Showing 1-5 of 5 results.