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-10 of 11 results. Next

A335677 a(n) = A159065(n+1) - A334701(n).

Original entry on oeis.org

0, 1, 3, 11, 23, 47, 79, 139, 193, 303, 437, 595, 777, 1079, 1361, 1747, 2181, 2743, 3369, 4147, 4867, 5883, 6995, 8203, 9507, 11243, 12949, 14955, 17105, 19527, 22109, 25123, 27979, 31563, 35363, 39455, 43771, 49031, 54095, 59743, 65671, 72143, 78919, 86459, 93967, 102843, 112119, 121795, 131871
Offset: 1

Views

Author

N. J. A. Sloane, Jun 22 2020

Keywords

Comments

It would be nice to have a formula or recurrence.

Crossrefs

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.]

A333275 Irregular triangle read by rows: consider the graph defined in A306302 formed from a row of n adjacent congruent rectangles by drawing the diagonals of all visible rectangles; T(n,k) (n >= 1, 2 <= k <= 2n+2) is the number of non-boundary vertices in the graph at which k polygons meet.

Original entry on oeis.org

0, 0, 1, 0, 0, 6, 0, 1, 0, 0, 24, 0, 2, 0, 1, 0, 0, 54, 0, 8, 0, 2, 0, 1, 0, 0, 124, 0, 18, 0, 2, 0, 2, 0, 1, 0, 0, 214, 0, 32, 0, 10, 0, 2, 0, 2, 0, 1, 0, 0, 382, 0, 50, 0, 22, 0, 2, 0, 2, 0, 2, 0, 1, 0, 0, 598, 0, 102, 0, 18, 0, 12, 0, 2, 0, 2, 0, 2, 0, 1
Offset: 1

Views

Author

Keywords

Comments

The number of polygons meeting at a non-boundary vertex is simply the degree (or valency) of that vertex.
Row sums are A159065.
Sum_k k*T(n,k) gives A333277.
See A333274 for the degrees if the boundary vertices are included.
T(n,k) = 0 if k is odd. But the triangle includes those zero entries because this is used to construct A333274.

Examples

			Led d denote the number of polygons meeting at a vertex.
For n=2, in the interiors of each of the two squares there are 3 points with d=4, and the center point has d=6.
So in total there are 6 points with d=4 and 1 with d=6. So row 2 of the triangle is [0, 0, 6, 0, 1].
The triangle begins:
0,0,1,
0,0,6,0,1,
0,0,24,0,2,0,1,
0,0,54,0,8,0,2,0,1,
0,0,124,0,18,0,2,0,2,0,1,
0,0,214,0,32,0,10,0,2,0,2,0,1,
0,0,382,0,50,0,22,0,2,0,2,0,2,0,1,
0,0,598,0,102,0,18,0,12,0,2,0,2,0,2,0,1
...
If we leave out the uninteresting zeros, the triangle begins:
[1]
[6, 1]
[24, 2, 1]
[54, 8, 2, 1]
[124, 18, 2, 2, 1]
[214, 32, 10, 2, 2, 1]
[382, 50, 22, 2, 2, 2, 1]
[598, 102, 18, 12, 2, 2, 2, 1]
[950, 126, 32, 26, 2, 2, 2, 2, 1]
[1334, 198, 62, 20, 14, 2, 2, 2, 2, 1]
[1912, 286, 100, 10, 30, 2, 2, 2, 2, 2, 1]
[2622, 390, 118, 38, 22, 16, 2, 2, 2, 2, 2, 1]
... - _N. J. A. Sloane_, Jul 27 2020
		

Crossrefs

Extensions

a(36) and beyond from Lars Blomberg, Jun 17 2020

A290132 The number of edges in a graph induced by a regular drawing of K_{n,n}.

Original entry on oeis.org

1, 6, 24, 74, 170, 362, 642, 1110, 1766, 2706, 3894, 5558, 7602, 10326, 13562, 17510, 22178, 28006, 34634, 42722, 51922, 62570, 74450, 88462, 103994, 121862, 141482, 163610, 187886, 215578, 245430, 279198, 315958, 356390, 399830, 447542, 498626, 555278, 615698, 681206
Offset: 1

Views

Author

R. J. Mathar, Jul 20 2017

Keywords

Crossrefs

Programs

  • Maple
    A290132 := proc(n)
        2*n+A290131(n)+A159065(n)-1 ;
    end proc:
    seq(A290132(n),n=1..40);
  • Mathematica
    b[n_] := Sum[(n-i+1)(n-j+1) Boole[GCD[i, j] == 1], {i, n}, {j, n}];
    A290131[n_] := b[n-1] + (n-1)^2;
    A159065[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[2x <= n - 1 && 2y <= n - 1, s2 += (n - 2x)(n - 2y)]]]]; s1 - s2];
    a[n_] := 2n + A290131[n] + A159065[n] - 1;
    Table[a[n], {n, 1, 40}] (* Jean-François Alcover, May 24 2023, after Joerg Arndt in A159065 *)
  • 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 a159065(n):
        c=0
        for a in range(1, n):
            for b in range(1, n):
                if gcd(a, b)==1:
                    c+=(n - a)*(n - b)
                    if 2*aIndranil Ghosh, Jul 20 2017

Formula

a(n) = 2*n + A290131(n) + A159065(n) - 1.

A333276 a(n) = Sum_k k*A333274(n,k).

Original entry on oeis.org

12, 50, 152, 346, 732, 1294, 2232, 3546, 5428, 7806, 11136, 15226, 20676, 27150, 35048, 44386, 56044, 69302, 85480, 103882, 125180, 148942, 176968, 208034, 243772, 283014, 327272, 375826, 431212, 490918, 558456, 631978, 712844, 799726, 895152, 997322, 1110628
Offset: 1

Views

Author

Keywords

Comments

a(n)/A331755(n) is the average number of polygons touching a vertex in the graph defined in A306302.

Crossrefs

Extensions

a(15) and beyond from Lars Blomberg, Jun 17 2020

A347750 Number of intersection points when every pair of vertices of a row of n adjacent congruent rectangles are joined by an infinite line.

Original entry on oeis.org

0, 5, 17, 57, 133, 297, 525, 925, 1477, 2289, 3277, 4701, 6437, 8805, 11541, 14917, 18869, 23893, 29509, 36473, 44349, 53545, 63605, 75629, 88901, 104325, 120981, 139913, 160581, 184409, 209885, 238989, 270525, 305413, 342413, 383301, 426949, 475757, 527205, 583261, 642821, 708717, 777829
Offset: 0

Views

Author

Keywords

Examples

			a(1) = 5 as connecting the four vertices of a single rectangle forms one new vertex inside the rectangle, giving a total of 4 + 1 = 5 total intersection points.
a(2) = 17 as connecting the six vertices of two adjacent rectangles forms seven vertices inside the rectangles while also forming four vertices outside the rectangles. The total number of intersection points is then 6 + 7 + 4 = 17.
See the linked images for further examples.
		

Crossrefs

Cf. A344993 (number of polygons), A347751 (number of edges), A159065, A331755, A092275 (number of intersections resp. inside the rectangles, on or inside them, above them).

Formula

a(n) = A347751(n) - A344993(n) + 1.
It seems that a(n) = 2 * A159065(n+1) + 3 for n>0. - Andrei Zabolotskii, Jul 03 2025

A333277 a(n) = Sum_k k*A333275(n,k).

Original entry on oeis.org

4, 30, 116, 290, 652, 1186, 2092, 3370, 5212, 7546, 10828, 14866, 20260, 26674, 34508, 43778, 55364, 68546, 84644, 102962, 124172, 147842, 175772, 206738, 242372, 281506, 325652, 374090, 429356, 488938, 556348, 629738, 710468, 797210, 892492, 994514, 1107668
Offset: 1

Views

Author

Keywords

Comments

a(n)/A331755(n) is the average number of polygons touching a non-boundary vertex in the graph defined in A306302.

Crossrefs

Extensions

a(6) and beyond from Lars Blomberg, Jun 17 2020

A359691 Number of crossings 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

1, 7, 59, 275, 1949, 3971, 20333, 45705, 120899, 205233, 629761, 897707, 2334291, 3461329, 5516985, 8467899
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 for images of the graph.

Crossrefs

Cf. A359690 (vertices), A359692 (regions), A359693 (edges), A359694 (k-gons), A005728, A159065, A331755, A359654, A358887, A358883, A006842, A006843.

Formula

a(n) = A359690(n) - 2*A005728(n).

A335056 Triangle read by rows: consider a figure made up of a row of n congruent rectangles and the diagonals of all possible rectangles; T(n,k) (1 <= k <= n) is the number of vertices inside the k-th rectangle.

Original entry on oeis.org

1, 3, 3, 5, 11, 5, 7, 19, 19, 7, 9, 29, 43, 29, 9, 11, 37, 61, 61, 37, 11, 13, 47, 83, 105, 83, 47, 13, 15, 57, 103, 143, 143, 103, 57, 15, 17, 69, 125, 183, 211, 183, 125, 69, 17, 19, 81, 143, 215, 267, 267, 215, 143, 81, 19, 21, 95, 167, 253, 329, 369, 329, 253, 167, 95, 21, 23, 109, 189, 289, 385, 455, 455, 385, 289, 189, 109, 23
Offset: 1

Views

Author

Keywords

Comments

The terms are from numeric computation - no formula for a(n) is currently known.

Examples

			Triangle begins:
1;
3, 3;
5, 11, 5;
7, 19, 19, 7;
9, 29, 43, 29, 9;
11, 37, 61, 61, 37, 11;
13, 47, 83, 105, 83, 47, 13;
15, 57, 103, 143, 143, 103, 57, 15;
17, 69, 125, 183, 211, 183, 125, 69, 17;
19, 81, 143, 215, 267, 267, 215, 143, 81, 19;
21, 95, 167, 253, 329, 369, 329, 253, 167, 95, 21;
23, 109, 189, 289, 385, 455, 455, 385, 289, 189, 109, 23;
25, 125, 215, 331, 451, 551, 597, 551, 451, 331, 215, 125, 25;
		

Crossrefs

Formula

Row sum n + Row sum A335074(n) = A159065(n).
Showing 1-10 of 11 results. Next