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

A332599 Triangle read by rows: T(n,k) = number of vertices in a "frame" of size n X k (see Comments in A331457 for definition).

Original entry on oeis.org

5, 13, 37, 35, 99, 152, 75, 213, 256, 364, 159, 401, 448, 568, 776, 275, 657, 704, 836, 1056, 1340, 477, 1085, 1132, 1276, 1508, 1804, 2272, 755, 1619, 1712, 1868, 2112, 2420, 2900, 3532, 1163, 2327, 2552, 2720, 2976, 3296, 3788, 4432, 5336, 1659, 3257, 3568, 3748, 4016, 4348, 4852, 5508, 6424, 7516
Offset: 1

Views

Author

Keywords

Comments

See A331457 and A331776 for further illustrations.
There is a crucial difference between frames of size nX2 and size nXk with k = 1 or k >= 3. If k != 2, all regions are either triangles or quadrilaterals, but for k=2 regions with larger numbers of sides can appear. Remember also that for k <= 2, the "frame" has no hole, and the graph has genus 0, whereas for k >= 3 there is a nontrivial hole and the graph has genus 1.

Examples

			Triangle begins:
[5],
[13, 37],
[35, 99, 152],
[75, 213, 256, 364],
[159, 401, 448, 568, 776],
[275, 657, 704, 836, 1056, 1340],
[477, 1085, 1132, 1276, 1508, 1804, 2272],
[755, 1619, 1712, 1868, 2112, 2420, 2900, 3532],
[1163, 2327, 2552, 2720, 2976, 3296, 3788, 4432, 5336],
[1659, 3257, 3568, 3748, 4016, 4348, 4852, 5508, 6424, 7516],
...
		

Crossrefs

The main diagonal is A332598.

Formula

Column 1 is A331755, for which there is an explicit formula.
Column 2 is A331763, for which no formula is known.
For m >= n >= 3, T(m,n) = A332600(m,n) - A331457(m,n) (Euler for genus 1 graph), and both A332600 and A331457 have explicit formulas.

Extensions

More terms from N. J. A. Sloane, Mar 13 2020

A332597 Number of edges in a "frame" of size n X n (see Comments in A331776 for definition).

Original entry on oeis.org

8, 92, 360, 860, 1792, 3124, 5256, 8188, 12304, 17460, 24568, 33244, 44688, 58228, 74664, 94028, 118080, 145380, 178568, 216252, 259776, 308276, 365352, 428556, 501152, 580804, 670536, 768908, 880992, 1001764, 1138248, 1286748, 1449984, 1625300, 1817752, 2023740, 2252048, 2495476, 2759304, 3040460, 3349056
Offset: 1

Views

Author

Keywords

Comments

See A331776 for many other illustrations.
Theorem. Let z(n) = Sum_{i, j = 1..n, gcd(i,j)=1} (n+1-i)*(n+1-j) (this is A115004) and z_2(n) = Sum_{i, j = 1..n, gcd(i,j)=2} (n+1-i)*(n+1-j) (this is A331761). Then, for n >= 2, a(n) = 8*z(n) - 4*z_2(n) + 28*n^2 - 44*n + 8. - Scott R. Shannon and N. J. A. Sloane, Mar 06 2020

Crossrefs

Cf. A115004, A331761, A331776 (regions), A332598 (vertices).

Programs

  • Maple
    V := proc(m, n, q) local a, i, j; a:=0;
    for i from 1 to m do for j from 1 to n do
    if gcd(i, j)=q then a:=a+(m+1-i)*(n+1-j); fi; od: od: a; end;
    f := n -> if n=1 then 8 else 28*n^2 - 44*n + 8 + 8*V(n,n,1) - 4*V(n, n, 2); fi;
    [seq(f(n), n=1..50)]; # N. J. A. Sloane, Mar 10 2020
  • Python
    from sympy import totient
    def A332597(n): return 8 if n == 1 else 4*(n-1)*(8*n-1) + 8*sum(totient(i)*(n+1-i)*(n+i+1) for i in range(2,n//2+1)) + 8*sum(totient(i)*(n+1-i)*(2*n+2-i) for i in range(n//2+1,n+1)) # Chai Wah Wu, Aug 16 2021

Formula

For n > 1, a(n) = 4*(n-1)*(8*n-1) + 8*Sum_{i=2..floor(n/2)} (n+1-i)*(n+i+1)*phi(i) + 8*Sum_{i=floor(n/2)+1..n} (n+1-i)*(2*n+2-i)*phi(i). - Chai Wah Wu, Aug 16 2021

Extensions

More terms from N. J. A. Sloane, Mar 10 2020
Showing 1-2 of 2 results.