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.

A290131 Number of regions in a regular drawing of the complete bipartite graph K_{n,n}.

Original entry on oeis.org

0, 2, 12, 40, 96, 204, 368, 634, 1012, 1544, 2236, 3186, 4360, 5898, 7764, 10022, 12712, 16026, 19844, 24448, 29708, 35756, 42604, 50602, 59496, 69650, 80940, 93600, 107540, 123316, 140428, 159642, 180632, 203618, 228556, 255822, 285080, 317326, 352020, 389498
Offset: 1

Views

Author

R. J. Mathar, Jul 20 2017

Keywords

Crossrefs

For K_n see A007569, A007678, A135563.
The following eight sequences are all essentially the same. The simplest is A115004(n), which we denote by z(n). Then A088658(n) = 4*z(n-1); A114043(n) = 2*z(n-1)+2*n^2-2*n+1; A114146(n) = 2*A114043(n); A115005(n) = z(n-1)+n*(n-1); A141255(n) = 2*z(n-1)+2*n*(n-1); A290131(n) = z(n-1)+(n-1)^2; A306302(n) = z(n)+n^2+2*n. - N. J. A. Sloane, Feb 04 2020

Programs

  • Maple
    A290131 := proc(n)
        A115004(n-1)+(n-1)^2 ;
    end proc:
    seq(A290131(n),n=1..30) ;
  • Mathematica
    z[n_] := Sum[(n - i + 1)(n - j + 1) Boole[GCD[i, j] == 1], {i, n}, {j, n}];
    a[n_] := z[n - 1] + (n - 1)^2;
    Array[a, 40] (* Jean-François Alcover, Mar 24 2020 *)
  • Python
    from math import gcd
    def a115004(n):
        r=0
        for a in range(1, n + 1):
            for b in range(1, n + 1):
                if gcd(a, b)==1:r+=(n + 1 - a)*(n + 1 - b)
        return r
    def a(n): return a115004(n - 1) + (n - 1)**2
    print([a(n) for n in range(1, 51)]) # Indranil Ghosh, Jul 20 2017, after Maple code
    
  • Python
    from sympy import totient
    def A290131(n): return 2*(n-1)**2 + sum(totient(i)*(n-i)*(2*n-i) for i in range(2,n)) # Chai Wah Wu, Aug 16 2021

Formula

a(n) = A115004(n-1) + (n-1)^2.
a(n) = 2*(n-1)^2 + Sum_{i=2..n-1} (n-i)*(2n-i)*phi(i). - Chai Wah Wu, Aug 16 2021

A331755 Number of vertices in a regular drawing of the complete bipartite graph K_{n,n}.

Original entry on oeis.org

2, 5, 13, 35, 75, 159, 275, 477, 755, 1163, 1659, 2373, 3243, 4429, 5799, 7489, 9467, 11981, 14791, 18275, 22215, 26815, 31847, 37861, 44499, 52213, 60543, 70011, 80347, 92263, 105003, 119557, 135327, 152773, 171275, 191721, 213547, 237953
Offset: 1

Views

Author

N. J. A. Sloane, Feb 02 2020

Keywords

Crossrefs

Cf. A290131 (regions), A290132 (edges), A333274 (polygons per vertex), A333276, A159065.
For K_n see A007569, A007678, A135563.

Programs

  • Maple
    # Maple code from N. J. A. Sloane, Jul 16 2020
    V106i := proc(n) local ans,a,b; ans:=0;
    for a from 1 to n-1 do for b from 1 to n-1 do
    if igcd(a,b)=1 then ans:=ans + (n-a)*(n-b); fi; od: od: ans; end; # A115004
    V106ii := proc(n) local ans,a,b; ans:=0;
    for a from 1 to floor(n/2) do for b from 1 to floor(n/2) do
    if igcd(a,b)=1 then ans:=ans + (n-2*a)*(n-2*b); fi; od: od: ans; end; # A331761
    A331755 := n -> 2*(n+1) + V106i(n+1) - V106ii(n+1);
  • Mathematica
    a[n_]:=Module[{x,y,s1=0,s2=0}, For[x=1, x<=n-1, x++, For[y=1, y<=n-1, y++, If[GCD[x,y]==1,s1+=(n-x)*(n-y); If[2*x<=n-1&&2*y<=n-1,s2+=(n-2*x)*(n-2*y)]]]]; s1-s2]; Table[a[n]+ 2 n, {n, 1, 40}] (* Vincenzo Librandi, Feb 04 2020 *)

Formula

a(n) = A290132(n) - A290131(n) + 1.
a(n) = A159065(n) + 2*n.
This is column 1 of A331453.
a(n) = (9/(8*Pi^2))*n^4 + O(n^3 log(n)). Asymptotic to (9/(2*Pi^2))*A000537(n-1). [Stéphane Legendre, see A159065.]

A359693 Number of edges in a regular drawing of a complete bipartite graph where the vertex positions on each part equal the Farey series of order n.

Original entry on oeis.org

6, 24, 162, 670, 4456, 8942, 44470, 98902, 259114, 438552, 1330566, 1897164, 4893752, 7246502, 11544278, 17678880
Offset: 1

Views

Author

Keywords

Comments

The number of vertices along each edge is A005728(n). No formula for a(n) is known.
See A359690 and A359692 for images of the graph.

Crossrefs

Cf. A359690 (vertices), A359691 (crossings), A359692 (regions), A359694 (k-gons), A005728, A290132, A359655, A358888, A358884, A006842, A006843.

Formula

a(n) = A359690(n) + A359692(n) - 2*A005728(n) + 1 by Euler's formula.

A369177 Number of edges in a graph of n adjacent rectangles in a row with all possible diagonals drawn, as in A306302, but without the rectangles' edges which are perpendicular to the row.

Original entry on oeis.org

6, 24, 66, 152, 318, 576, 998, 1608, 2474, 3600, 5162, 7100, 9670, 12772, 16546, 21036, 26622, 33024, 40814, 49716, 60006, 71560, 85158, 100264, 117626, 136780, 158358, 182080, 209106, 238312, 271314, 307304, 346866, 389488, 436286, 486444, 542026, 601436, 665814, 734504, 809882, 889544
Offset: 1

Views

Author

Scott R. Shannon, Jan 15 2024

Keywords

Comments

See A369175 and A369176 for images of the graph.

Crossrefs

Cf. A369175 (regions), A369176 (vertices), A369178 (k-gons), A306302, A331757, A290132, A368757.

Formula

a(n) = A369175(n) + A369176(n) - 1 by Euler's formula.

A334224 Consider a graph as defined in A306302 formed from a row of n adjacent congruent squares with the diagonals of all possible rectangles; a(n) is the minimum edge length of the squares such that the vertices formed by all intersections have integer x and y coordinates.

Original entry on oeis.org

2, 6, 60, 420, 2520, 27720, 360360, 360360, 12252240, 232792560, 232792560, 5354228880, 26771144400, 80313433200, 2329089562800, 72201776446800, 144403552893600, 144403552893600, 5342931457063200
Offset: 1

Views

Author

Keywords

Examples

			a(1) = 2 as for a single square, with its bottom left corner at the origin, with both diagonals drawn the intersection point of those lines is at (L/2,L/2) where L is the edge length. Thus L=2 for this to have integer coordinates.
a(2) = 6 as for two vertically adjacent squares the seven intersection points of the diagonals and shared internal edge have coordinates (L/3,4L/3),(L/2,3L/2),(2L/3,4L/3),(L/2,L),(L/3,2L/3),(L/2,L/2),(2L/3,2L/3). Thus L=6, the lowest common multiple of the denominators, for all these points to have integer coordinates.
		

Crossrefs

Formula

a(n) = A003418(2n-1) = A076100(n) for n>1.
Showing 1-5 of 5 results.