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.

Previous Showing 11-16 of 16 results.

A228313 Triangle read by rows: T(p,q) (1<=q<=p) is the Wiener index of the Cartesian product of the cycles C(p) and C(q) (the torus grid graph).

Original entry on oeis.org

0, 1, 8, 3, 21, 54, 8, 48, 120, 256, 15, 85, 210, 440, 750, 27, 144, 351, 720, 1215, 1944, 42, 217, 525, 1064, 1785, 2835, 4116, 64, 320, 768, 1536, 2560, 4032, 5824, 8192, 90, 441, 1053, 2088, 3465, 5427, 7812, 10944, 14580, 125, 600, 1425, 2800
Offset: 1

Views

Author

Emeric Deutsch, Aug 25 2013

Keywords

Comments

T(n,n) = A122657(n).
T(n,1) = A034828(n).
T(n,2) = A138179(n) (n>=3).

Crossrefs

Programs

  • Maple
    Wi := proc (p, q) if `mod`(p, 2) = 1 and `mod`(q, 2) = 1 then (1/8)*p*q*(p+q)*(p*q-1) elif `mod`(p, 2) = 0 and `mod`(q, 2) = 0 then (1/8)*p^2*q^2*(p+q) elif `mod`(p, 2) = 1 and `mod`(q, 2) = 0 then (1/8)*p*q^2*(p^2+p*q-1) else (1/8)*p^2*q*(q^2+p*q-1) end if end proc: for i to 10 do seq(Wi(i, j), j = 1 .. i) end do; # yields sequence in triangular form
    H := proc (p, q) local br, h: br := proc (n) options operator, arrow: sum(t^k, k = 0 .. n-1) end proc: h := proc (m) if `mod`(m, 2) = 0 then m*(br((1/2)*m)-1)+(1/2)*m*t^((1/2)*m) else m*t*br((1/2)*m-1/2) end if end proc: sort(expand(2*h(p)*h(q)+p*h(q)+q*h(p))) end proc: Wi := proc (p, q) options operator, arrow: subs(t = 1, diff(H(p, q), t)) end proc: for i to 10 do seq(Wi(i, j), j = 1 .. i) end do; # yields sequence in triangular form

Formula

T(p,q) = pq(p+q)(pq - 1)/8 if both p and q are odd.
T(p,q) = p^2*q^2*(p + q)/8 if both p and q are even.
T(p,q) = pq^2*(p^2 - 1 + pq)/8 if p is odd and q is even.
T(p,q) = p^2*q*(q^2 - 1 + pq)/8 if p is even and q is odd.
The first Maple program makes use of the above formulas.
The Hosoya-Wiener polynomial of C(p) X C(q) is 2*h(p)*h(q) + p*h(q) + q*h(p), where h(j) denotes the Hosoya-Wiener polynomial of the cycle C(j).
The command H(p,q) in the 2nd Maple program yields the corresponding Hosoya-Wiener polynomial.

A107238 A Chebyshev transform of number triangle A107230.

Original entry on oeis.org

1, 1, 1, 0, 2, 1, 0, 3, 3, 1, 0, 4, 8, 4, 1, 0, 5, 15, 15, 5, 1, 0, 6, 27, 36, 24, 6, 1, 0, 7, 42, 84, 70, 35, 7, 1, 0, 8, 64, 160, 200, 120, 48, 8, 1, 0, 9, 90, 300, 450, 405, 189, 63, 9, 1, 0, 10, 125, 500, 1000, 1050, 735, 280, 80, 10, 1, 0, 11, 165, 825, 1925, 2695, 2156, 1232, 396
Offset: 0

Views

Author

Paul Barry, May 14 2005

Keywords

Comments

Product of the number triangle A107230 by the Riordan array ((1-x^2)/(1+x^2),x/(1+x^2)). First column if C(1,n), second column is n (A001477), third column is essentially A034828.

Examples

			Triangle begins
1;
1,1;
0,2,1;
0,3,3,1;
0,4,8,4,1;
0,5,15,15,5,1;
		

Formula

Number triangle T(n, k)=sum{j=0..floor(n/2), (n/(n-j))(-1)^j*C(n-j, j)*A107230(n-2j, k)} (with T(0, n)=0^n).

A143939 Triangle read by rows: T(n,k) is the number of unordered pairs of vertices at distance k in the cycle C_n (1 <= k <= floor(n/2)).

Original entry on oeis.org

1, 3, 4, 2, 5, 5, 6, 6, 3, 7, 7, 7, 8, 8, 8, 4, 9, 9, 9, 9, 10, 10, 10, 10, 5, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 6, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 7, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 8, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18
Offset: 2

Views

Author

Emeric Deutsch, Sep 06 2008

Keywords

Comments

Row n contains floor(n/2) entries.
The entries in row n are the coefficients of the Wiener polynomial of the cycle C_n.
Sum of entries in row n = n(n-1)/2 = A000217(n-1).
Sum_{k=1..floor(n/2)} k*T(n,k) = the Wiener index of the cycle C_n = A034828(n).

Examples

			T(4,2)=2 because in C_4 (a square) there are 2 distances equal to 2.
Triangle starts:
  1;
  3;
  4, 2;
  5, 5;
  6, 6, 3;
  7, 7, 7;
		

Crossrefs

Programs

  • Maple
    P:=proc(n) if `mod`(n, 2)=0 then n*(sum(q^j,j=1..(1/2)*n-1))+(1/2)*n*q^((1/2)*n) else n*(sum(q^j,j=1..(1/2)*n-1/2)) end if end proc: for n from 2 to 18 do p[n]:=P(n) end do: for n from 2 to 18 do seq(coeff(p[n],q,j),j=1..floor((1/2)*n)) end do; # yields sequence in triangular form

Formula

T(2n+1,k) = 2n+1 (1<=k<=n); T(2n,k)=2n (1<=k<=n-1); T(2n,n)=n.
G.f. = G(q,z) = qz^2/(1+z-z^2-qz^3)/((1-qz^2)^2*(1-z)^2).

A187883 Triangle by rows, A003983 * A000012 as infinite lower triangular matrices.

Original entry on oeis.org

1, 2, 1, 4, 3, 1, 6, 5, 3, 1, 9, 8, 6, 3, 1, 12, 11, 9, 6, 3, 1, 16, 15, 13, 10, 6, 3, 1, 20, 19, 17, 14, 10, 6, 3, 1, 25, 24, 22, 19, 15, 10, 6, 3, 1, 30, 29, 27, 24, 20, 15, 10, 6, 3, 1, 36, 35, 33, 30, 26, 21, 15, 10, 6, 3, 1
Offset: 1

Views

Author

Gary W. Adamson, Mar 15 2011

Keywords

Comments

Sum of n-th row terms = A034828(n+1).

Examples

			Row 4 = (6, 5, 3, 1), since row 4 of the A003983 triangle = (1, 2, 2, 1).
First few rows of the triangle =
1
2, 1
4, 3, 1
6, 5, 3, 1
9, 8, 6, 3, 1
12, 11, 9, 6, 3, 1
16, 15, 13, 10, 6, 3, 1
20, 19, 17, 14, 10, 6, 3, 1
25, 24, 22, 19, 15, 10, 6, 3, 1
30, 29, 27, 24, 20, 15, 10, 6, 3, 1
36, 35, 33, 30, 26, 21, 15, 10, 6, 3, 1
42, 41, 39, 36, 32, 27, 21, 15, 10, 6, 3, 1
...
		

Crossrefs

Formula

Given the correlation triangle A003983, partial sums of terms starting from the right.

A192028 Square array read by antidiagonals: W(n,m) (n >= 1, m >= 1) is the Wiener index of the graph G(n,m) obtained from the n-circuit graph by joining at each of its nodes a path with m nodes (n >= 1, m >= 1; if m=1, then the n-circuit is not modified).

Original entry on oeis.org

0, 1, 1, 3, 10, 4, 8, 27, 35, 10, 15, 60, 93, 84, 20, 27, 105, 196, 222, 165, 35, 42, 174, 335, 456, 435, 286, 56, 64, 259, 537, 770, 880, 753, 455, 84, 90, 376, 784, 1212, 1475, 1508, 1197, 680, 120, 125, 513, 1112, 1750, 2295, 2515, 2380, 1788, 969, 165
Offset: 1

Views

Author

Emeric Deutsch, Jun 27 2011

Keywords

Comments

W(1,m) = A000292(m-1).
W(2,m) = A000447(m) = A000292(2m-2).
W(n,1) = A034828(n).
W(n,2) = A180574(n) (n >= 3).

Examples

			a(3,1)=27 because in the graph with vertex set {A,B,C,A',B',C'} and edge set {AB, BC, CA, AA', BB', CC'} we have 6 pairs of vertices at distance 1 (the edges), 6 pairs at distance 2 (A'B, A'C, B'A, B'C, C'A, C'B) and 3 pairs at distance 3 (A'B', B'C', C'A'); 6*1 + 6*2 + 3*3 = 27.
The square array starts:
  0,  1,   4,  10,  20,   35,   56,   84, ...;
  1, 10,  35,  84, 165,  286,  455,  680, ...;
  3, 27,  93, 222, 435,  753, 1197, 1788, ...;
  8, 60, 196, 456, 880, 1508, 2380, 3536, ...;
		

Crossrefs

Programs

  • Maple
    W := proc (n, m) if `mod`(n, 2) = 0 then (1/24)*n*m*(3*n^2*m+12*n*m^2-8*m^2-12*n*m+12*m-4) else (1/24)*n*m*(3*n^2*m+12*n*m^2-8*m^2-12*n*m+9*m-4) end if end proc: for n to 10 do seq(W(n-i, i+1), i = 0 .. n-1) end do; # yields the antidiagonals in triangular form
    W := proc (n, m) if `mod`(n, 2) = 0 then (1/24)*n*m*(3*n^2*m+12*n*m^2-8*m^2-12*n*m+12*m-4) else (1/24)*n*m*(3*n^2*m+12*n*m^2-8*m^2-12*n*m+9*m-4) end if end proc: for n to 10 do seq(W(n, m), m = 1 .. 10) end do; # yields the first 10 entries of each of rows 1,2,...,10.
    P := proc (n, m) if `mod`(n, 2) = 0 then sort(expand(simplify(n*t*(t^m-m*t+m-1)/(1-t)^2+(n*(sum(t^j, j = 1 .. (1/2)*n-1))+(1/2)*n*t^((1/2)*n))*(1-t^m)^2/(1-t)^2))) else sort(expand(simplify(n*t*(t^m-m*t+m-1)/(1-t)^2+n*(sum(t^j, j = 1 .. (1/2)*n-1/2))*(1-t^m)^2/(1-t)^2))) end if end proc: P(3, 4);

Formula

W(n,m) = (1/24)*n*m*(3*m*n^2 + 12*n*m^2 - 8*m^2 - 12*n*m + 12*m - 4) if n is even;
W(n,m) = (1/24)*n*m*(3*m*n^2 + 12*n*m^2 - 8*m^2 - 12*n*m + 9*m - 4) if n is odd.
The Wiener polynomial P(n,m;t) of the graph G(n,m) is given in the 3rd Maple program. It gives, for example, P(3,4) = 12*t + 12*t^2 + 12*t^3 + 12*t^4 + 9*t^5 + 6*t^6 + 3*t^7. Its derivative, evaluated at t=1, yields the corresponding Wiener index W(3,4)=222.

A258122 The multiplicative Wiener index of the cycle graph C_n (n>=3).

Original entry on oeis.org

1, 4, 32, 1728, 279936, 429981696, 2641807540224, 198135565516800000, 74300837068800000000000, 415989582513831936000000000000, 13974055172471046820331520000000000000, 8285929429609672784320522302259200000000000000, 34392048668455155319241086527782019661824000000000000000, 2908094259133650016606461590346496281704647737999360000000000000000, 1967201733524639238023450985668890257001862763630451357856563200000000000000000
Offset: 3

Views

Author

Emeric Deutsch, Aug 17 2015

Keywords

Comments

The multiplicative Wiener index of a connected simple graph G is defined as the product of distances between all pairs of distinct vertices of G.
In the I. Gutman et al. reference, p. 114, the right-hand side of the formula for the multiplicative Wiener index pi(C_n) of C_n (n even) should be replaced by k^k*((k-1)!)^n.
For the Wiener index of C_n see A034828.

Examples

			a(4) = 4 because the distances between vertices are 1,1,1,1,2,and 2.
a(5) = 32 because the distances between vertices are 1,1,1,1,1,2,2,2,2, and 2.
		

Crossrefs

Cf. A034828.

Programs

  • Maple
    a := proc(n) if `mod`(n, 2) = 1 then factorial((1/2)*n-1/2)^n else ((1/2)*n)^((1/2)*n)*factorial((1/2)*n-1)^n end if end proc: seq(a(n), n = 3 .. 17);

Formula

a(n) = (k!)^n if n = 2k + 1 is odd (k>=1); a(n) = k^k((k - 1)!)^n if n = 2k is even (k>=2).
Previous Showing 11-16 of 16 results.